php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72003 mb_strpos argument error not correct
Submitted: 2016-04-11 15:45 UTC Modified: 2016-04-11 18:05 UTC
From: mattkasper at gmail dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 7.0.5 OS: Suse 12 on s390
Private report: No CVE-ID: None
 [2016-04-11 15:45 UTC] mattkasper at gmail dot com
Description:
------------
mb_strpos takes $needle, $haystack, $offset and $encoding as arguments but an error is thrown complaining of an empty delimiter when valid arguments are passed.

Test script:
---------------
<?php
var_dump(mb_strpos("test", "test", 0, "UTF-8"));

Expected result:
----------------
int(0)

Actual result:
--------------
Warning: MB_strpos(): Empty delimiter in test.php on line 2

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-11 18:04 UTC] mattkasper at gmail dot com
Apparently we were running 7.0.2 (not 7.0.5) and after updating to 7.0.5, the issue was resolved and mb functions were working correctly.
 [2016-04-11 18:05 UTC] mattkasper at gmail dot com
-Status: Open +Status: Closed
 [2016-04-11 18:05 UTC] mattkasper at gmail dot com
Resolved in 7.0.5.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC