|  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
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

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:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-10-26 23:03 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Mon Jun 01 09:01:28 2020 UTC