Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You need to change :</p> <pre><code>function tep_sanitize_string($string) { $string = ereg_replace(' +', ' ', trim($string)); return preg_replace("/[&lt;&gt;]/", '_', $string); } </code></pre> <p>to</p> <pre><code>function tep_sanitize_string($string) { $string = preg_replace('{ +}', ' ', trim($string)); return preg_replace("/[&lt;&gt;]/", '_', $string); } </code></pre> <p>There are also many other ereg_replace calls that you might find:</p> <pre><code>ereg_replace('2037' . '$', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); ereg_replace('"', ' ', $pieces[$k]); ereg_replace('(' . implode('|', $from) . ')', $to, $string); ereg_replace('[^0-9]', '', $number); ereg_replace('-language', '-' . $languages[$j]['directory'], $cached_file); ereg_replace('(' . implode('|', $from) . ')', $to, $string); ereg_replace("\r","",$which_text); ereg_replace('-language', '-' . $language, $cache_blocks[$i]['file']); ereg_replace(",\n$", '', $schema); ereg_replace("\n#", "\n".'\#', $row); ereg_replace(', $', '', $schema); </code></pre> <p>You should change these to </p> <pre><code>preg_replace('{2037\z}', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); str_replace('"', ' ', $pieces[$k]); preg_replace('{(' . implode('|', $from) . ')}', $to, $string); preg_replace('{\D}', '', $number); str_replace('-language', '-' . $languages[$j]['directory'], $cached_file); str_replace("\r","",$which_text); str_replace('-language', '-' . $language, $cache_blocks[$i]['file']); preg_replace("{,\n\z}", '', $schema); preg_replace("{\n#}", "\n".'\#', $row); preg_replace('{, \z}', '', $schema); </code></pre> <p>Hope this is what you want</p> <p>EDIT :</p> <p>There is only one change:</p> <pre><code>ereg('RegExp', $x $y); </code></pre> <p>to </p> <pre><code>preg_match('/RegExp/', $x $y); </code></pre> <p>Same for “ereg_replace”</p> <pre><code>ereg_replace('RegExp', $x, $y); </code></pre> <p>to</p> <pre><code>preg_replace('/RegExp/', $x, $y); </code></pre> <p>Hope you get it.</p> <p>EDIT:</p> <p>Also the split is depreciated . You should change:</p> <pre><code>$pieces = split('[[:space:]]+', $search_str); </code></pre> <p>to </p> <pre><code>$pieces = preg_split("/[\s,]+/", $search_str); </code></pre> <p>Hope these things helps you</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload