• I’m using Events Manager on a web host that is running PHP 5.4 and my error logs are filling up with the following warnings caused by some code in Events Manager not meeting the strict standards for this version of PHP:

    [01-Mar-2014 01:47:21 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method EM_Calendar::init() should not be called statically in /home/username/public_html/wp-includes/plugin.php on line 429
    [01-Mar-2014 01:47:21 UTC] PHP Strict Standards:  Declaration of WPFC_EM_Categories_Walker::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/username/public_html/wp-content/plugins/events-manager/em-wpfc.php on line 294

    Since they’re just warnings, they don’t prevent Events Manager from working, but I’m posting in the hopes that they will be fixed in the next version.

    https://wordpress.org/plugins/events-manager/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    since it’s only a warning message and not fatal error, you can try to turn-off php display_error and can I know what is your current WP version?

    Thread Starter linux4me2

    (@linux4me2)

    Thanks for the replay.

    I’m using the latest version of WordPress, 3.8.1.

    I already have display_errors set to “off,” thanks. The warnings are showing up in my error logs, which I don’t want to disable because I find them useful for debugging code. That’s how I caught these warnings. They do fill up the error logs. : )

    What version of Events Manager are you using?

    Thread Starter linux4me2

    (@linux4me2)

    Events Manager 5.5.2.

    Sorry, I should have put that in the initial post.

    Can’t be 100% certain, but I’m pretty sure there’s a fix for this in the the Dev version (available under Events > Settings > General Settings > Admin Tools).

    Thread Starter linux4me2

    (@linux4me2)

    I only have Events Manager installed on a live site, so I’m a little worried about changing to the Dev version, but if there are just a few lines of code you want me to tweak to test it, I’m game. I could quickly reverse that if it blew up on me.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    with regards to this warnings

    [01-Mar-2014 01:47:21 UTC] PHP Strict Standards:  call_user_func_array() expects parameter 1 to be a valid callback, non-static method EM_Calendar::init() should not be called statically in /home/username/public_html/wp-includes/plugin.php on line 429
    
    [01-Mar-2014 01:47:21 UTC] PHP Strict Standards:  Declaration of WPFC_EM_Categories_Walker::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/username/public_html/wp-content/plugins/events-manager/em-wpfc.php on line 294

    – on second line above, you can directly go to that line and modify
    – on first line above, you can check classes/em-calendar.php

    Thread Starter linux4me2

    (@linux4me2)

    I had some time this morning so I installed Events Manager 5.5.2 on a test site and upgraded it to the Dev version 5.5.2.1. Then I did a file comparison to see if these issues have been addressed in the current Dev version, but they have not. The only difference between /events-manager/em-wpfc.php in 5.5.2 and 5.5.2.1 is not associated with this issue, it’s associated with getting color options on line 181. The two versions of /classes/em-calendar.php are identical.

    So, I took a look at /classes/em-caldendar.php, and the start_el function is declared like this:
    function start_el(&$output, $category, $depth, $args) {
    To make it compatible with Walker::start_el() as in the warning above, does that mean I would change it to look like this?:
    function start_el(&$output, $category, $depth = 0, $args = Array, $current_object_id = 0) {

    I’m not really sure about that one.

    As for the init() function in /classes/em-calendar.php, it’s just an empty function in v. 5.5.2:

    function init(){
    		//nothing to init anymore
    	}

    So it looks like the fix for that warning would just be to call it statically:

    public static function init(){
    		//nothing to init anymore
    	}

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP Strict Standards Warnings with Events Manager and PHP 5.4’ is closed to new replies.