First, the message it is not an error, it is a notice. Telling the owner of the site that this script will cease to function in the future as the instruction used will not be supported in future PHP versions.
Second, it is your php ini file which decides which notices/warnings/errors are written into the log. So you could set a different logging level, omitting notices and deprecated messages from the log.
Third, you could contact the author of the script. As @atsio removed those essential lines, I have them here for your convenience so you can add them back into your script.
<small>Script by <a rel="external" href="http://www.nordicweather.net">nordicweather.net</a>.
Powered by <a rel="external" href="http://www.wxsim.com">WXSIM</a>.</small>
As a service to you and maybe others having this same “problem”, I used the Ken True / Saratoga script plaintext-parser.php to borrow the current version for that line 481. The wxall.plaintext.php is partly based on Ken’s script.
How to install:
- rename your current wxall.plaintext.php script. Be sure to find the one which is used on your website pages as often there are multiple folders (wxsim / wxsim_wxall)
- unzip attachement and put it in the same folder as the renamed one.
If other readers or you modified this wxall.plaintext.php script I add the changes here also:
The line raising the preg-replace /e notice in the current version reads:
$fixedtxt = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$fixedtxt);
it is replaced using Ken’s code with
if(!function_exists('wxsim_repl')) {
function wxsim_repl($m) {
return ('. ' . strtoupper($m[1])); // function does what deprecated /e did for us before
}
}
$fixedtxt = preg_replace_callback('!\.\s+([a-z])!s','wxsim_repl',$fixedtxt);
Succes, Wim
EDIT: 2016-05-22removed a type, thanks goes to @youhead for finding it.
wxall.plaintext.php.zip (14.1 KB)