php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73077 php compatibility: mb_strpos() [offset warning]
Submitted: 2016-09-14 01:30 UTC Modified: 2016-09-14 01:33 UTC
From: lars at moelleken dot org Assigned: cmb (profile)
Status: Duplicate Package: mbstring related
PHP Version: 7.1.0RC1 OS: Ubuntu 12.04.5 LTS
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
16 + 32 = ?
Subscribe to this entry?

 
 [2016-09-14 01:30 UTC] lars at moelleken dot org
Description:
------------
"mb_strpos()" is not compatible with old PHP versions, because it dons't trigger a warning anymore "Offset not contained in string"?!

-> https://3v4l.org/o1YNG

Test script:
---------------
var_dump(mb_strpos('abc', 'a', -1));

Expected result:
----------------
Warning: mb_strpos(): Offset not contained in string in /in/o1YNG on line 3
bool(false)

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-14 01:33 UTC] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2016-09-14 01:33 UTC] cmb@php.net
Duplicate of bug #73076.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 11 01:01:31 2024 UTC