I tried upgrading from PHP 5.6 to PHP 7.1 (GoDaddy). When running the "3in1" script http://indiantrailweather.com/wx3in1.php the "description and notes" section in the "Overview" tab display "blank". Any ideas as to what I should check? All of the other page scripts on my site process fine using PHP 7.1. All Saratoga files are current. Please note that I'm using the modified 6.92 version Saratoga dashboard and corresponding ajax file.
Thank you.
Update: Reverted back to PHP 5.6 until I can find a solution.
This is the only php7.x error I could find and it occurs in wxall.plaintext.php
<b>Warning</b>: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in
<b>/. . . . . /wxsim_wxall/wxall.plaintext.php</b> on line <b>481</b><br />
As this is a subset of Ken True's plaintext parser you can not use the updated Saratoga version instead.
This is the line 481-483 in the
original downloaded version in wxall.plaintext.php, scan your version of the script to find it.
$fixedtxt = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$fixedtxt);
$wxalltext[$i] = $fixedtxt;
} # EOF own loop
Just set that first line to comment and all data will be displayed with php7 also. Maybe an extra linefeed or other small formatting problem will occur.
# $fixedtxt = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$fixedtxt);
$wxalltext[$i] = $fixedtxt;
} # EOF own loop
Or you could try this replacement for the preg_replace with should do the trick also. But that preg_replace/call_back is Ken True's speciality, ask him if it does not work as expected.
# $fixedtxt = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$fixedtxt);
$fixedtxt = preg_replace_callback('/([.!?])\s*(\w)/',
create_function('$matches', 'return strtoupper($matches[0]);'), $fixedtxt);
$wxalltext[$i] = $fixedtxt;
} # EOF own loop
Wim