Wordpress and FeedBurner Error
I used to use FeedSmith FeedBurner Plugin for my wordpress. Today, suddenly, my feeds are giving following errors under each Post Title. I recently upgrade to WP 3.0.1 but has been a week.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /home/name/wordpress/wp-includes/plugin.php on line 166
I deactivated the plugin and install new plugin "FD Feedburner Plugin" and try again but still no luck. The error开发者_如何学编程 still persist even on FeedBurner Page.
Any idea please?
Hopefully you have this fixed already. But I'd like to throw some thoughts on this since it remains unanswered. It appears that 50 people have come here since you posted 7 months ago so maybe I can help someone looking to resolve this or a similar problem. My answer is not specific to FeedBurner or even Wordpress.
The call_user_func_array function takes a string or an array as the first parameter and this parameter determines what function/method call will be made. In the case that the first parameter is an array then the method name should actually be the second element of the array and the first element should be the class name that contains the method.
For example:
call_user_func_array(array($class_name, $method_name), $params)
Because your error is saying that "'Array' was given" I can only assume that the first parameter passed to the function is either an empty array, the first parameter is an array with the first element being an empty array, or somewhere earlier in the code the class or function name was converted to a string as an array.
The same error message can result if the first function parameter is an empty array
Both of the following BAD examples will give the "'Array' was given" error:
call_user_func_array(array(), $params);
call_user_func_array(array(array(), 'method_name'), $params);
So if nothing else, you know that first parameter in the call_user_func_array function call is not what it needs to be.
Hope it helps!
精彩评论