Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromphp/php-src

Commitc05ee74

Browse files
committed
Fixed bug #63943 (Bad warning text from strpos() on empty needle)
1 parent67c662a commitc05ee74

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

‎NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ PHP NEWS
99
. Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user).
1010
(Johannes)
1111

12+
- Core
13+
. Fixed bug #63943 (Bad warning text from strpos() on empty needle).
14+
(Laruence)
15+
1216
- cURL extension:
1317
. Fixed bug (segfault due to libcurl connection caching). (Pierrick)
1418
. Fixed bug #63795 (CURL >= 7.28.0 no longer support value 1 for

‎ext/standard/string.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1744,7 +1744,7 @@ PHP_FUNCTION(strpos)
17441744

17451745
if (Z_TYPE_P(needle)==IS_STRING) {
17461746
if (!Z_STRLEN_P(needle)) {
1747-
php_error_docref(NULLTSRMLS_CC,E_WARNING, "Emptydelimiter");
1747+
php_error_docref(NULLTSRMLS_CC,E_WARNING, "Emptyneedle");
17481748
RETURN_FALSE;
17491749
}
17501750

Lines changed: 8 additions & 0 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp