mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
Merge branch 'PHP-5.3' into PHP-5.4
This commit is contained in:
commit
15aaa9c660
@ -1811,7 +1811,7 @@ PHP_FUNCTION(strpos)
|
||||
|
||||
if (Z_TYPE_P(needle) == IS_STRING) {
|
||||
if (!Z_STRLEN_P(needle)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty needle");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
8
ext/standard/tests/strings/bug63943.phpt
Normal file
8
ext/standard/tests/strings/bug63943.phpt
Normal file
@ -0,0 +1,8 @@
|
||||
--TEST--
|
||||
Bug #63943 (Bad warning text from strpos() on empty needle)
|
||||
--FILE--
|
||||
<?php
|
||||
strpos("lllllll", '');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: strpos(): Empty needle in %sbug63943.php on line %d
|
Loading…
Reference in New Issue
Block a user