From e70238e8acd4ebdf1a3e30d63e8ffb1a46ab6d15 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 7 Sep 2015 16:07:45 +0300 Subject: Remove unnecessary count() calls from _sanitize_globals() foreach() just won't execute for an empty array, it does that check internally. --- system/core/Input.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/core/Input.php b/system/core/Input.php index 67a495e74..4e7a4e95e 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -606,7 +606,7 @@ class CI_Input { { $_GET = array(); } - elseif (is_array($_GET) && count($_GET) > 0) + elseif (is_array($_GET)) { foreach ($_GET as $key => $val) { @@ -615,7 +615,7 @@ class CI_Input { } // Clean $_POST Data - if (is_array($_POST) && count($_POST) > 0) + if (is_array($_POST)) { foreach ($_POST as $key => $val) { @@ -624,7 +624,7 @@ class CI_Input { } // Clean $_COOKIE Data - if (is_array($_COOKIE) && count($_COOKIE) > 0) + if (is_array($_COOKIE)) { // Also get rid of specially treated cookies that might be set by a server // or silly application, that are of no use to a CI application anyway -- cgit v1.2.3-24-g4f1b