BUG: PHP Strict Standards Warnings in Events+

From PHP 5.5 logs:
[27-Mar-2015 17:07:52 UTC] PHP Strict Standards: Declaration of Eab_CalendarTable_UpcomingCalendarWidget::get_month_calendar() should be compatible with WpmuDev_CalendarTable::get_month_calendar($timestamp = false) in E:\inetpub\PInner\wp-content\plugins\events-and-bookings\lib\class_eab_calendar_helper.php on line 336
[27-Mar-2015 17:07:52 UTC] PHP Strict Standards: Declaration of Eab_CalendarTable_EventArchiveCalendar::get_month_calendar() should be compatible with WpmuDev_CalendarTable::get_month_calendar($timestamp = false) in E:\inetpub\PInner\wp-content\plugins\events-and-bookings\lib\class_eab_calendar_helper.php on line 481

To fix:
\wp-content\plugins\events-and-bookings\lib\class_eab_calendar_helper.php
line 325 & 430: make function variable have default of 0 like parent function.
public function get_month_calendar ($timestamp=false)

Thanks Guys!

  • Michelle Shull

    Hi, Mike!

    This is not indicative of a bug, it's because PHP is a chatty language. The warnings you're seeing aren't causing any harm, there's just a more modern way to address the particular function addressed. Our devs keep track of these warnings and alerts, and try to continually adapt our code to meet the newest PHP strict standards. Additionally, these warnings are for PHP 5.5, when most self-hosted WP users are on servers with 5.3, or even 5.2.

    But this is not harming your site in any way, everything still works and is still compatible. You can remove these warnings by setting WP_DEBUG to false, or to write to log instead of displaying on your site.

    Hope this helps!

  • itsupport5

    WP_DEBUG is set to false and PHP errors already go to log, which is where I get to wade through messages like this looking for the messages for the problem I am actually debugging...
    Although technically not a bug since it doesn't produce an incorrect output, it is still incorrect and fills up my log files. For how easy it is to fix, why not just do it on the next update.

    As for PHP 5.2, 5.3, and 5.4, they all failed the security audit we had last November... so 5.5+ is now required. I have already been instructed to update to PHP 6 by the end of Summer.
    We are a medical clinic so protecting our patient's health information is not only something that we take very seriously, it is also governmentally enforced under HIPAA & HITECH acts. We have to pass 2 yearly security audits... so there is no way we are not staying up to date.

    Additionally this clearly violates Substitutability, a logical basis for parent-child objects... So it is at the very least an oversight, that should get resolved.
    http://en.wikipedia.org/wiki/Liskov_substitution_principle

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.