Discovered a fatal error when I added a "Featured Post" type of widget to a theme where the sidebar that is rendered after the main column.
BPEO's the_content filter does not test for the post_type and therefore throws PHP Fatal error: Uncaught exception 'Exception' with message 'Error in formating DateTime object. Expected DateTime, but instead given boolean' in /path/to/event-organiser-utility-functions.php:31 when the widget calls the_content for a post_type other than event. Although the error doesn't look related to this, it is thrown because a post does not have the required meta.
Discovered a fatal error when I added a "Featured Post" type of widget to a theme where the sidebar that is rendered after the main column.
BPEO's
the_content
filter does not test for thepost_type
and therefore throwsPHP Fatal error: Uncaught exception 'Exception' with message 'Error in formating DateTime object. Expected DateTime, but instead given boolean' in /path/to/event-organiser-utility-functions.php:31
when the widget callsthe_content
for apost_type
other thanevent
. Although the error doesn't look related to this, it is thrown because apost
does not have the required meta.