We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9566314 + f3b1b85 commit 6deb836Copy full SHA for 6deb836
ext/standard/string.c
@@ -1811,7 +1811,7 @@ PHP_FUNCTION(strpos)
1811
1812
if (Z_TYPE_P(needle) == IS_STRING) {
1813
if (!Z_STRLEN_P(needle)) {
1814
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter");
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty needle");
1815
RETURN_FALSE;
1816
}
1817
ext/standard/tests/strings/bug63943.phpt
@@ -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