From: oortm at gmx dot net
Operating system: all
PHP version: 4.3.9
PHP Bug Type: *General Issues
Bug description: ereg_replace can't handle certain char
Description:
------------
The ereg_replace-function can't handle a closing hook in a string as
parameter. Try this to reproduce the bug:
$message = ereg_replace(":-)","<img src='../images/hi.gif'>",$message);
It chokes on the first parameter seeing a ')'. As the string is enclosed
by quotes it shouldn't do this and parse on the string until the last
quote is found.
oortm
netherlands
Reproduce code:
---------------
$message = ereg_replace(":-)","<img src='../images/hi.gif'>",$message);
Expected result:
----------------
1. modified content of the string entitled 'message'
2. unmodifed content of the string entitled 'message'
Actual result:
--------------
script is exited
--
Edit bug report at http://bugs.php.net/?id=32969&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32969&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32969&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32969&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32969&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32969&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32969&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32969&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32969&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32969&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32969&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32969&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32969&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32969&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32969&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32969&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32969&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32969&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32969&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32969&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32969&r=mysqlcfg