Edit report at https://bugs.php.net/bug.php?id=63943&edit=1

 ID:                 63943
 Updated by:         larue...@php.net
 Reported by:        matteosistisette at gmail dot com
 Summary:            Bad warning text from strpos() on empty needle
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            *General Issues
 PHP Version:        5.5Git-2013-01-08 (Git)
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of laruence
Revision: 
http://git.php.net/?p=php-src.git;a=commit;h=c05ee74e7ff28b49018bf3e8f452bfd5386d1b68
Log: Fixed bug #63943 (Bad warning text from strpos() on empty needle)


Previous Comments:
------------------------------------------------------------------------
[2013-01-08 17:18:15] matteosistisette at gmail dot com

Description:
------------
strpos($haystack,$needle);

When $needle is empty (""), the text of the warning is unclear, it says "empty 
delimiter". The word "delimiter" makes no sense in this context.

Test script:
---------------
strpos("lkjsbsjfdb", "");

Expected result:
----------------
Warning: strpos(): Empty needle in XXX on line YYY

Actual result:
--------------
Warning: strpos(): Empty delimiter in XXX on line YYY


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63943&edit=1

Reply via email to