Bug #51413 [Opn->Wfx]: ereg() no longer works as in earlier versions
| From: | rasmus@php.net | Date: | Sat, 27 Mar 2010 16:14:49 +0000 |
| Subject: | Bug #51413 [Opn->Wfx]: ereg() no longer works as in earlier versions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149103@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51413&edit=1
ID: 51413
Updated by: rasmus@php.net
Reported by: rprangnell at gmail dot com
Summary: ereg() no longer works as in earlier versions
-Status: Open
+Status: Wont fix
Type: Bug
Package: Program Execution
Operating System: Windows XP
PHP Version: 5.3.2
New Comment:
Probably part of bringing everything under the same parameter handling
code.
This will have to be fixed in your application. And they really
shouldn't be
using ereg() anymore anyway. It is slower and doesn't support Unicode
at all.
All ereg() calls should be replaced with preg_match() calls. You will
notice
that the call will also throw an E_DEPRECATED warning in 5.3 letting you
know you
should be replacing those calls.
Previous Comments:
------------------------------------------------------------------------
[2010-03-27 17:03:16] rprangnell at gmail dot com
Description:
------------
PHP scripts that use the ereg() function and which worked properly in
earlier versions may no longer work because of a change in the way
ereg() deals with function arguments. Namely, ereg() now seems to check
the "expected argument" type and throws an error if the argument is of a
different type.
I came across this bug on a brand new, clean install of Drupal 6.3 with
the Ubercart ecommerce package. With PHP 5.3 running, certain images
would not display and multiple warning messages would pop up, each of
them detailing the culprit as ereg(). Simply by changing the running PHP
version to 5.2.11 cured all problems.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51413&edit=1