diff options
author | Derek Allard <derek.allard@ellislab.com> | 2008-06-04 22:58:03 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2008-06-04 22:58:03 +0200 |
commit | c1acb410524414fa925c47834d124a3884b68dcb (patch) | |
tree | 7652fe2a0a840ddee428612f56f6479daba7cb69 /system | |
parent | 144cb5b3c82ff9a25bd4e675385603675e3699d0 (diff) |
a few tweaks for speed
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Input.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php index b0a39c59f..50b4d823d 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -521,8 +521,7 @@ class CI_Input { * between ascii characters, like Java\0script.
*
*/
- $str = preg_replace('/\0+/', '', $str);
- $str = preg_replace('/(\\\\0)+/', '', $str);
+ $str = preg_replace(array('/\0+/', '/(\\\\0)+/'), '', $str);
/*
* Protect GET variables in URLs
@@ -646,7 +645,9 @@ class CI_Input { foreach ($words as $word)
{
$temp = '';
- for ($i = 0; $i < strlen($word); $i++)
+ $wordlen = strlen($word);
+
+ for ($i = 0; $i < $wordlen; $i++)
{
$temp .= substr($word, $i, 1)."\s*";
}
|