php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63943 Bad warning text from strpos() on empty needle
Submitted: 2013-01-08 17:18 UTC Modified: -
From: matteosistisette at gmail dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.5Git-2013-01-08 (Git) OS:
Private report: No CVE-ID: None
 [2013-01-08 17:18 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-01-09 02:53 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2013-01-09 02:53 UTC] laruence@php.net
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)
 [2013-01-09 02:56 UTC] laruence@php.net
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)
 [2013-01-09 02:57 UTC] laruence@php.net
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)
 [2013-01-09 02:58 UTC] laruence@php.net
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)
 [2013-01-12 16:39 UTC] derick@php.net
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)
 [2013-03-01 18:32 UTC] stas@php.net
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)
 [2014-10-07 23:20 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=c05ee74e7ff28b49018bf3e8f452bfd5386d1b68
Log: Fixed bug #63943 (Bad warning text from strpos() on empty needle)
 [2014-10-07 23:31 UTC] stas@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=c05ee74e7ff28b49018bf3e8f452bfd5386d1b68
Log: Fixed bug #63943 (Bad warning text from strpos() on empty needle)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC