From ff5d13b710007d7a0648542070a4e10a3a8a284d Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 17 Oct 2008 14:18:45 +0000 Subject: syntax simplification for testing first character of string if (substr($ip_segments[0], 0, 1) == '0') to if ($ip_segments[0][0] == '0') --- system/libraries/Input.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Input.php') diff --git a/system/libraries/Input.php b/system/libraries/Input.php index fae188e3c..e66d48147 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -404,7 +404,7 @@ class CI_Input { return FALSE; } // IP can not start with 0 - if (substr($ip_segments[0], 0, 1) == '0') + if ($ip_segments[0][0] == '0') { return FALSE; } -- cgit v1.2.3-24-g4f1b