Opened 16 years ago
Closed 14 years ago
#787 closed Defect (fixed)
PHP 5.3 compatibility - ereg
Reported by: | Nicolas | Owned by: | davea |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Web - Project | Version: | |
Keywords: | patch | Cc: |
Description
PHP 5.3 will deprecate the "ereg" module, in favor of Perl-compatible regular expressions (PCRE). I think it will be completely removed in PHP 6.
I found two places that used ereg_replace
where actually they don't need any kind of regular expressions (patch attached).
html/inc/geoip.inc uses ereg
. I still haven't checked what it does with it; it's 3rd party code.
html/inc/bolt_ex.inc has one use of it. I think it should be changed to PCRE, but that would mean functionality and documentation changes (do the BOLT docs say what kind of regex is used?).
Attachments (1)
Change History (7)
Changed 16 years ago by
Attachment: | ereg_replace_remove.diff added |
---|
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
r18109 introduced a new ereg() call. Patch coming soon.
comment:4 Changed 14 years ago by
-
html/inc/translation.inc
function getPOLineContent($line, $file){ 159 159 $start = strpos($line, '"')+1; 160 160 $stop = strrpos($line, '"'); 161 161 $x = substr($line, $start, $stop-$start); 162 $n = ereg("[^\\]\"", $x);162 $n = preg_match("/[^\\\\]\"/", $x); 163 163 if ($n) { 164 164 echo "ERROR - MISMATCHED QUOTES IN $file: $line\n"; 165 165 return "";
comment:5 Changed 14 years ago by
Keywords: | patch added |
---|
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
PHP 5.3.0 was officially released 30 June 2009.