Fixed bug #15562: PHP warning for str_pad() in t3lib_div::cmpIPv4() (Thanks to Markus...
authorSteffen Gebert <steffen.gebert@typo3.org>
Sun, 5 Sep 2010 14:30:41 +0000 (14:30 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Sun, 5 Sep 2010 14:30:41 +0000 (14:30 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@8761 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index 9f0960d..4ee0726 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-05  Steffen Gebert  <steffen@steffen-gebert.de>
+
+       * Fixed bug #15562: PHP warning for str_pad() in t3lib_div::cmpIPv4() (Thanks to Markus Klein)
+
 2010-09-04  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #15326: htmlArea RTE: W3C Markup Validation issues
index c1332eb..a0ee62f 100644 (file)
@@ -713,9 +713,9 @@ final class t3lib_div {
                                                // "192.168.3.0/24"
                                        $lnet = ip2long($test);
                                        $lip = ip2long($baseIP);
-                                       $binnet = str_pad( decbin($lnet),32,'0','STR_PAD_LEFT');
+                                       $binnet = str_pad(decbin($lnet), 32, '0', STR_PAD_LEFT);
                                        $firstpart = substr($binnet,0,$mask);
-                                       $binip = str_pad( decbin($lip),32,'0','STR_PAD_LEFT');
+                                       $binip = str_pad(decbin($lip), 32, '0', STR_PAD_LEFT);
                                        $firstip = substr($binip,0,$mask);
                                        $yes = (strcmp($firstpart,$firstip)==0);
                                } else {