• Resolved Ynah

    (@ynahpantig)


    Hi there,

    We installed your plugin on our site and it works perfectly except that we’re getting this error:
    call_user_func_array() expects parameter 1 to be a valid callback, second array member is not a valid method in wp-includes/class-wp-hook.php

    I narrowed it down to this line in the plugin:
    add_action( 'wp_enqueue_scripts', array( $this, self::timeline_express_print_inline_styles( $options ) ) );

    Commenting that out, I got rid of the error, but of course, this function is needed so I had to find a way to work around it. Here’s what I came up with:

    add_action( 'wp_enqueue_scripts', array( $this, 'timeline_express_print_inline_styles' ) );
    
    public function timeline_express_print_inline_styles() {
    
        $timeline_express_options = timeline_express_get_options();
        ...
    }
    

    Is there a way for me to add this into my theme? I tried removing the action and adding it again on my own files so I don’t touch the plugin, it it doesn’t seem to be working.

    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Code Parrots

    (@codeparrots)

    Hey @ynahpantig,

    I haven’t encountered that error before but will certainly double check. What version of php is your site running?

    If we can find and replicate it we should be able to patch it up fairly quickly.

    Thread Starter Ynah

    (@ynahpantig)

    Hi @codeparrots,

    Here’s what I got when I ran php -v on our server:

    PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct  3 2016 13:00:37)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.5.0,
    Plugin Contributor Code Parrots

    (@codeparrots)

    Can you try updating your server to PHP 5.6 to see if that helps resolve the issue?

    Thread Starter Ynah

    (@ynahpantig)

    Hi @codeparrots,

    I took a look at my php version on my machine and here’s what I got:

    PHP 5.6.28 (cli) (built: Dec  6 2016 12:38:54)
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies

    I’m seeing the warning on my local machine as well.

    Regarding our server, we’ll have to run that over by the client as it is a massive site with a lot of features.

    Thread Starter Ynah

    (@ynahpantig)

    Hi @codeparrots,

    Any news on the possible patch? Thanks.

    Plugin Contributor Code Parrots

    (@codeparrots)

    Hi @ynahpantig,

    No new news on our end. We still haven’t run into the error on our end, either on a live server or on our staging setup.

    We are still trying to track this bug down.

    Thanks.

    Plugin Contributor Code Parrots

    (@codeparrots)

    Is there any updates on your end in regards to this issue? Can you try updating to the latest release and re-testing.

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘call_user_func_array error’ is closed to new replies.