Title: error call_user_func ??
Last modified: August 30, 2016

---

# error call_user_func ??

 *  Resolved [benjo2412](https://wordpress.org/support/users/benjo2412/)
 * (@benjo2412)
 * [11 years ago](https://wordpress.org/support/topic/error-call_user_func/)
 * hi,
    this plugin don’t work with my wp 3.2 i have tried too old versions, but
   nothing:( i have this error on admin:
 * Configuration
 * Warning: call_user_func() expects parameter 1 to be a valid callback, function”
   not found or invalid function name in /home/pippo/public_html/wp-admin/includes/
   template.php on line 1160
 * i have see that function file:
 * function do_settings_sections($page) {
    global $wp_settings_sections, $wp_settings_fields;
 *  if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) )
   
   return;
 *  foreach ( (array) $wp_settings_sections[$page] as $section ) {
    echo “<h3>{$
   section[‘title’]}</h3>\n”; call_user_func($section[‘callback’], $section); if(!
   isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[
   $page][$section[‘id’]]) ) continue; echo ‘<table class=”form-table”>’; do_settings_fields(
   $page, $section[‘id’]); echo ‘</table>’; } }
 * why??
    how i can fix it? thanks
 * [https://wordpress.org/plugins/cookie-notice/](https://wordpress.org/plugins/cookie-notice/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208815)
 * Try changing this part of code, line 270 cookie-notice.php, from this:
 *     ```
       /**
        * Regiseter plugin settings.
        */
       public function register_settings() {
       	register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
   
       	// configuration
       	add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
       	add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_see_more', __( 'More info link', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_link_target', __( 'Link target', 'cookie-notice' ), array( $this, 'cn_link_target' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_refuse_opt', __( 'Refuse button', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_time', __( 'Cookie expiry', 'cookie-notice' ), array( $this, 'cn_time' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
   
       	// design
       	add_settings_section( 'cookie_notice_design', __( 'Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' );
       	add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
       }
       ```
   
 * to this:
 *     ```
       /**
        * Regiseter plugin settings.
        */
       public function register_settings() {
       	register_setting( 'cookie_notice_options', 'cookie_notice_options', array( $this, 'validate_options' ) );
   
       	// configuration
       	add_settings_section( 'cookie_notice_configuration', __( 'Configuration', 'cookie-notice' ), array( $this, 'cn_section_configuration' ), 'cookie_notice_options' );
       	add_settings_field( 'cn_message_text', __( 'Message', 'cookie-notice' ), array( $this, 'cn_message_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_accept_text', __( 'Button text', 'cookie-notice' ), array( $this, 'cn_accept_text' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_see_more', __( 'More info link', 'cookie-notice' ), array( $this, 'cn_see_more' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_link_target', __( 'Link target', 'cookie-notice' ), array( $this, 'cn_link_target' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_refuse_opt', __( 'Refuse button', 'cookie-notice' ), array( $this, 'cn_refuse_opt' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_on_scroll', __( 'On scroll', 'cookie-notice' ), array( $this, 'cn_on_scroll' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_time', __( 'Cookie expiry', 'cookie-notice' ), array( $this, 'cn_time' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_script_placement', __( 'Script placement', 'cookie-notice' ), array( $this, 'cn_script_placement' ), 'cookie_notice_options', 'cookie_notice_configuration' );
       	add_settings_field( 'cn_deactivation_delete', __( 'Deactivation', 'cookie-notice' ), array( $this, 'cn_deactivation_delete' ), 'cookie_notice_options', 'cookie_notice_configuration' );
   
       	// design
       	add_settings_section( 'cookie_notice_design', __( 'Design', 'cookie-notice' ), array( $this, 'cn_section_design' ), 'cookie_notice_options' );
       	add_settings_field( 'cn_position', __( 'Position', 'cookie-notice' ), array( $this, 'cn_position' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_hide_effect', __( 'Animation', 'cookie-notice' ), array( $this, 'cn_hide_effect' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_css_style', __( 'Button style', 'cookie-notice' ), array( $this, 'cn_css_style' ), 'cookie_notice_options', 'cookie_notice_design' );
       	add_settings_field( 'cn_colors', __( 'Colors', 'cookie-notice' ), array( $this, 'cn_colors' ), 'cookie_notice_options', 'cookie_notice_design' );
       }
   
       /**
        * Section callback: fix for WP < 3.3
        */
       public function cn_section_configuration() {}
       public function cn_section_design() {}
       ```
   
 * And provide some feedback, if that solves the issue.
 *  Thread Starter [benjo2412](https://wordpress.org/support/users/benjo2412/)
 * (@benjo2412)
 * [11 years ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208821)
 * on admin no more errors,
    but on frontend i see this error:
 * Warning: Creating default object from empty value in /home/pippo/public_html/
   wp-includes/user.php on line 65
 *  // TODO do we deprecate the wp_authentication action?
    do_action_ref_array(‘
   wp_authenticate’, array(&$credentials[‘user_login’], &$credentials[‘user_password’]));
 *  if ( ” === $secure_cookie )
    $secure_cookie = is_ssl();
 *  $secure_cookie = apply_filters(‘secure_signon_cookie’, $secure_cookie, $credentials);
 *  global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie
   
   $auth_secure_cookie = $secure_cookie;
 *  add_filter(‘authenticate’, ‘wp_authenticate_cookie’, 30, 3);
 *  $user = wp_authenticate($credentials[‘user_login’], $credentials[‘user_password’]);
 *  if ( is_wp_error($user) ) {
    if ( $user->get_error_codes() == array(’empty_username’,’
   empty_password’) ) { $user = new WP_Error(”, ”); }
 *  return $user;
    }
 *  wp_set_auth_cookie($user->ID, $credentials[‘remember’], $secure_cookie);
    do_action(‘
   wp_login’, $credentials[‘user_login’]); return $user; <— THIS IS 65 LINE }
 *  Thread Starter [benjo2412](https://wordpress.org/support/users/benjo2412/)
 * (@benjo2412)
 * [11 years ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208823)
 * ehm sorry,
    on line 657
 * Warning: Creating default object from empty value in /home/pippo/public_html/
   wp-includes/user.php on line 657
 * /**
    * Get the blogs a user belongs to. * * [@since](https://wordpress.org/support/users/since/)
   3.0.0 * * [@param](https://wordpress.org/support/users/param/) int $id User Id*
   [@param](https://wordpress.org/support/users/param/) bool $all Whether to retrieve
   all blogs or only blogs that are not marked as deleted, archived, or spam. * 
   [@return](https://wordpress.org/support/users/return/) array A list of the user’s
   blogs. False if the user was not found or an empty array if the user has no blogs.*/
   function get_blogs_of_user( $id, $all = false ) { global $wpdb;
 *  if ( !is_multisite() ) {
    $blog_id = get_current_blog_id(); <<– THIS IS LINE
   657 $blogs = array(); $blogs[ $blog_id ]->userblog_id = $blog_id; $blogs[ $blog_id]-
   >blogname = get_option(‘blogname’); $blogs[ $blog_id ]->domain = ”; $blogs[ $
   blog_id ]->path = ”; $blogs[ $blog_id ]->site_id = 1; $blogs[ $blog_id ]->siteurl
   = get_option(‘siteurl’); return $blogs; }
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [11 years ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208824)
 * Ok, but did you doublecheck that it comes from our plugin? I see not relation
   to it.
 *  Thread Starter [benjo2412](https://wordpress.org/support/users/benjo2412/)
 * (@benjo2412)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208828)
 * mhh it is very strange, however error on admin aren’t more..
 * but on frontend Cookie Notice with my message is not visibility 🙁
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208830)
 * Can you post a link to your site?
 *  Thread Starter [benjo2412](https://wordpress.org/support/users/benjo2412/)
 * (@benjo2412)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208858)
 * if i can on pvt or on ur email…
 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208860)
 * Use oour support forum and private reply option.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘error call_user_func ??’ is closed to new replies.

 * ![](https://ps.w.org/cookie-notice/assets/icon-256x256.png?rev=3549327)
 * [Compliance by Hu-manity.co](https://wordpress.org/plugins/cookie-notice/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cookie-notice/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cookie-notice/)
 * [Active Topics](https://wordpress.org/support/plugin/cookie-notice/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cookie-notice/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cookie-notice/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [dFactory](https://wordpress.org/support/users/dfactory/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/error-call_user_func/#post-6208860)
 * Status: resolved