Skip to content

Commit 6deb836

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
2 parents 9566314 + f3b1b85 commit 6deb836

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ext/standard/string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1811,7 +1811,7 @@ PHP_FUNCTION(strpos)
18111811

18121812
if (Z_TYPE_P(needle) == IS_STRING) {
18131813
if (!Z_STRLEN_P(needle)) {
1814-
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
1814+
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty needle");
18151815
RETURN_FALSE;
18161816
}
18171817

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--TEST--
2+
Bug #63943 (Bad warning text from strpos() on empty needle)
3+
--FILE--
4+
<?php
5+
strpos("lllllll", '');
6+
?>
7+
--EXPECTF--
8+
Warning: strpos(): Empty needle in %sbug63943.php on line %d

0 commit comments

Comments
 (0)