Title: call_user_func_array error
Last modified: March 1, 2017

---

# call_user_func_array error

 *  Resolved [Ynah](https://wordpress.org/support/users/ynahpantig/)
 * (@ynahpantig)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/)
 * 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](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8860907)
 * Hey [@ynahpantig](https://wordpress.org/support/users/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](https://wordpress.org/support/users/ynahpantig/)
 * (@ynahpantig)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8862431)
 * Hi [@codeparrots](https://wordpress.org/support/users/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](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8862463)
 * Can you try updating your server to PHP 5.6 to see if that helps resolve the 
   issue?
 *  Thread Starter [Ynah](https://wordpress.org/support/users/ynahpantig/)
 * (@ynahpantig)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8862564)
 * Hi [@codeparrots](https://wordpress.org/support/users/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](https://wordpress.org/support/users/ynahpantig/)
 * (@ynahpantig)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8867397)
 * Hi [@codeparrots](https://wordpress.org/support/users/codeparrots/),
 * Any news on the possible patch? Thanks.
 *  Plugin Contributor [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8870109)
 * Hi [@ynahpantig](https://wordpress.org/support/users/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](https://wordpress.org/support/users/codeparrots/)
 * (@codeparrots)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8948824)
 * 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.

 * ![](https://ps.w.org/timeline-express/assets/icon-256x256.png?rev=1007462)
 * [Timeline Express](https://wordpress.org/plugins/timeline-express/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/timeline-express/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/timeline-express/)
 * [Active Topics](https://wordpress.org/support/plugin/timeline-express/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/timeline-express/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/timeline-express/reviews/)

## Tags

 * [call_user_func_array](https://wordpress.org/support/topic-tag/call_user_func_array/)

 * 7 replies
 * 2 participants
 * Last reply from: [Code Parrots](https://wordpress.org/support/users/codeparrots/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/call_user_func_array-error-7/#post-8948824)
 * Status: resolved