Good-Shepherd-Catholic-Radio / Theme-2017

WordPress Theme
0 stars 0 forks source link

PHP Warning - Illegal String Offsets #95

Closed BigActual closed 7 years ago

BigActual commented 7 years ago

[Mon Sep 25 01:05:16.183044 2017] [:error] [pid 28642] [client 138.201.23.68:43909] PHP Warning: Illegal string offset 'hour' in /nas/content/live/goodshepradio/wp-content/themes/Theme-2017/partials/loop/loop-radio_shows_list.php on line 99 [Mon Sep 25 01:05:16.183113 2017] [:error] [pid 28642] [client 138.201.23.68:43909] PHP Warning: Illegal string offset 'minute' in /nas/content/live/goodshepradio/wp-content/themes/Theme-2017/partials/loop/loop-radio_shows_list.php on line 100 [Mon Sep 25 01:05:16.183122 2017] [:error] [pid 28642] [client 138.201.23.68:43909] PHP Warning: Illegal string offset 'meridian' in /nas/content/live/goodshepradio/wp-content/themes/Theme-2017/partials/loop/loop-radio_shows_list.php on line 101

Available here: https://my.wpengine.com/installs/goodshepradio/error_logs#production

BigActual commented 7 years ago

I can't see any consistency to these errors. They don't occur once per day. Sometimes they occur in spurts of two or three repetitions. It always starts with hour, then minute, then meridian.

d4mation commented 7 years ago

This is due to the code for showing the Radio Shows List having to make assumptions about the data format and possibly a few Radio Shows are not adhering to that Format (Likely newly added/modified Radio Shows).

I have to be able to loop through the Recurrence Data for each Show in order to make the List of Timeslots on that page per-Show. If it is in a format that the code doesn't expect, it throws errors. Specifically due to things not existing in the data it finds that it expects to be there (Things like 'hour', 'minute', or 'meridian')

I'll have to investigate on Staging to determine which ones it is and what is happening.

d4mation commented 7 years ago

I'm thinking that as the Events Calendar updates, they have changed some of their data structures behind-the-scenes and they aren't updating old Events/Radio Shows to reflect this meaning that only newly created or updated Radio Shows will use the newer structures.

We'll want to keep an eye out (on this page in particular) for things like Timeslots being incorrect.