- Fixed mess with CGI/CLI -d option (now it works with cgi; constants are
working exactly like in php.ini; with FastCGI -d affects all requests).
(Dmitry)
+- Fixed bug #39032 (strcspn() stops on null character). (Tony)
- Fixed bug #39017 (foreach(($obj = new myClass) as $v); echo $obj; segfaults).
(Dmitry)
- Fixed bug #39004 (Fixed generation of config.nice with autoconf 2.60).
if (*spanp == c || p == s1_end) {
return p - s1;
}
- } while (spanp++ < s2_end);
+ } while (spanp++ < (s2_end - 1));
c = *++p;
}
/* NOTREACHED */
--- /dev/null
+--TEST--
+Bug #39032 (strcspn() stops on null character)
+--FILE--
+<?php
+
+var_dump(strcspn(chr(0),"x"));
+var_dump(strcspn(chr(0),""));
+var_dump(strcspn(chr(0),"qweqwe"));
+var_dump(strcspn(chr(1),"qweqwe"));
+
+echo "Done\n";
+?>
+--EXPECTF--
+int(1)
+int(0)
+int(1)
+int(1)
+Done