mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Merge branch 'PHP-5.4' into PHP-5.5
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user