#36198 [NEW]: Not understandible ereg()-warning "Invalid preceding regular expression"

From: Date: Sun, 29 Jan 2006 11:37:44 +0000
Subject: #36198 [NEW]: Not understandible ereg()-warning "Invalid preceding regular expression"
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969371753@lists.php.net to get a copy of this message
From: thomas at pixtur dot de Operating system: Debian Server PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Not understandible ereg()-warning "Invalid preceding regular expression" Description: ------------ The warning only occurs on very few plattforms. I probably could fix it in my code, if I could only understand it's meaning. If you google for the error-message you will find tons of broken pages with the same error but no explanation. Reproduce code: --------------- /* NOT reproducable */ class ListBlockColHtml extends ListBlockCol { function render_tr(&$obj, $style="") { if(!isset($obj) || !is_object($obj)) { trigger_error("ListBlockColHtml->render_tr() called without valid object",E_USER_WARNING); return; } $key= $this->key; $format= $this->format; $rest=$this->format; $style= $this->style ? "class='$this->style'" : ''; while( ereg("{\?([a-z_]*)}(.*)",$rest, $matches) ) { ### causes error $key=$matches[1]; $rest=$matches[2]; $value= isset($obj->$key) ? $obj->$key : "??$key"; $format=ereg_replace("{\?$key}",$value,$format); } print "<td $style>$format</td>"; } } -- Edit bug report at http://bugs.php.net/?id=36198&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36198&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36198&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36198&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36198&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36198&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36198&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36198&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36198&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36198&r=support Expected behavior: http://bugs.php.net/fix.php?id=36198&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36198&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36198&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36198&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36198&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36198&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36198&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36198&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36198&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36198&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36198&r=mysqlcfg

« previous php.doc (#969371753) next »