php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45896 Something causing Multibyte regular expressions to become 'empty'
Submitted: 2008-08-23 03:27 UTC Modified: 2008-11-03 01:00 UTC
Votes:2
Avg. Score:2.5 ± 1.5
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: quick dot webmaster at gmail dot com Assigned:
Status: No Feedback Package: mbstring related
PHP Version: 5.2.6 OS: Redhat
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-08-23 03:27 UTC] quick dot webmaster at gmail dot com
Description:
------------
Hi,

If you try to add a Korean character to a Regular Expression with setlocale and mb_encoding configured then it will cause PHP to not properly process the regular expression and will cause PHP to return the following error:

Warning: mb_ereg_search() [function.mb-ereg-search]: Empty regular expression

Reproduce code:
---------------
http://pastebin.ca/Cf42azGD

Password is moo

Expected result:
----------------
The Regular Expression should return the number 2.

Actual result:
--------------
Warning: mb_ereg_search() [function.mb-ereg-search]: Empty regular expression

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-26 23:03 UTC] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2008-11-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:25 2019 UTC