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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mattkasper at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 11:01:30 2024 UTC