From 67c662a0a2615d52215dccc4805e8eb989df7eab Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Sun, 6 Jan 2013 15:08:26 +0000 Subject: [PATCH 1/3] Update news with new bug fix. --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 0b5c207caf2..ee76efb3a37 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,10 @@ PHP NEWS . Fixed bug #55438 (Curlwapper is not sending http header randomly). (phpnet@lostreality.org, Pierrick) +- Date: + . Fixed bug #55397 (comparsion of incomplete DateTime causes SIGSEGV). + (Laruence, Derick) + 20 Dec 2012, PHP 5.3.20 - Zend Engine: From c05ee74e7ff28b49018bf3e8f452bfd5386d1b68 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 9 Jan 2013 10:53:20 +0800 Subject: [PATCH 2/3] Fixed bug #63943 (Bad warning text from strpos() on empty needle) --- NEWS | 4 ++++ ext/standard/string.c | 2 +- ext/standard/tests/strings/bug63943.phpt | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 ext/standard/tests/strings/bug63943.phpt diff --git a/NEWS b/NEWS index ee76efb3a37..e78af2339d8 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,10 @@ PHP NEWS . Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user). (Johannes) +- Core + . Fixed bug #63943 (Bad warning text from strpos() on empty needle). + (Laruence) + - cURL extension: . Fixed bug (segfault due to libcurl connection caching). (Pierrick) . Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for diff --git a/ext/standard/string.c b/ext/standard/string.c index b17ad506ef0..907301dfdfd 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1744,7 +1744,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 00000000000..6018879b24a --- /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-- + +--EXPECTF-- +Warning: strpos(): Empty needle in %sbug63943.php on line %d From f3b1b8516906fe900e521216c8f01e362790af30 Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Wed, 9 Jan 2013 10:55:50 +0800 Subject: [PATCH 3/3] update NEWS --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 9fca188c8f7..1abd3981a1e 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2012, PHP 5.4.12 +- Core: + . Fixed bug #63943 (Bad warning text from strpos() on empty needle). + (Laruence) + - Litespeed: . Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)