I decided to purchase WXSIM a few days ago - loving it!
I'm in the process of adding some scripts to my site that take advantage of it. However, a couple of scripts are based around an older version of PHP, and I use 7.2. I have spent some of the day fixing hundred of minor things, but a couple have stumped me.
I did do some searching but as my knowledge is limited, I couldn't fix it.
The three lines have all of the same warnings:
Code: Select all
PHP Warning: count(): Parameter must be an array or an object that implements Countable in
Line1:
Code: Select all
}elseif(count($icno12h)==1){
Code: Select all
if(count($icno12h)>1){
Code: Select all
if(count($tsdescs)>0){$tsdesc=max($tsdescs);}else{$tsdesc=$tsdescs;}
Code: Select all
PHP Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in
Code: Select all
$fixedtxt = preg_replace('!\.\s+([a-z])!es',"'. ' . strtoupper('\\1')",$fixedtxt);