summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2013-01-09 10:54:23 +0800
committerXinchen Hui <laruence@php.net>2013-01-09 10:54:23 +0800
commit15aaa9c6605b9ee5dfd568a13704f36a721433a0 (patch)
treebc73a85f9788635766c40cf953e7cc9eb8a162ab
parent6e684e6a6ceac89ad51f822493f702a6925a2d37 (diff)
parentc05ee74e7ff28b49018bf3e8f452bfd5386d1b68 (diff)
downloadphp-git-15aaa9c6605b9ee5dfd568a13704f36a721433a0.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
-rw-r--r--ext/standard/string.c2
-rw-r--r--ext/standard/tests/strings/bug63943.phpt8
2 files changed, 9 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index cf973300b2..29115fea7a 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -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;
}
diff --git a/ext/standard/tests/strings/bug63943.phpt b/ext/standard/tests/strings/bug63943.phpt
new file mode 100644
index 0000000000..6018879b24
--- /dev/null
+++ b/ext/standard/tests/strings/bug63943.phpt
@@ -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