Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #4682
      fmalinge
      Member

      Hi ,
      i ve install wp helpers and since i have this error when I go to dashboard :
      ( ! ) Warning: in_array() expects parameter 2 to be array, string given in C:\wamp\www\wppl_arto\wp-content\plugins\wp-helpers\wp-helpers.php on line 678
      Wordpress 4.3.1
      Piklist 9.9.4
      Fred

    • #4683

      I receive the same error when I disable dashboard widgets. I looked into the code, and it seem that there is an error in the remove_dashboard_widgets function

      $widgets = self::$options[‘remove_dashboard_widgets_new’][‘dashboard_widgets’];
      $widgets = is_array($widgets) ? $widgets : array($widgets);
      $widgets = $widgets[0];

      $widgets is initially an array, and the last line there extracts the first element and tries to feed it to

      if(in_array($dashboard_widget, $widgets))

      which results in the error, the second argument should be a string

      if the $widgets = $widgets[0]; line is removed, everything works as expected

    • #4698
      Steve
      Keymaster

      Can both of you please go to the DEVELOP tab in Helpers and copy your “WP Helpers database settings” and email to [email protected]?

    • #4705
      fmalinge
      Member

      Hi,
      Some work for you , i suppose you haven’t enought 🙂
      I ve tried to add a status for my post type and now i can’t access to the wp admin (so cannot send you wp hekpers db settings) :
      Warning: Invalid argument supplied for foreach() in C:\wamp\www\wppl_arto\wp-content\plugins\piklist-toolbox\includes\class-piklist-toolbox-post-types.php on line 322
      AND
      Warning: Cannot modify header information – headers already sent by (output started at C:\wamp\www\wppl_arto\wp-content\plugins\piklist-toolbox\includes\class-piklist-toolbox-post-types.php:322) in C:\wamp\www\wppl_arto\wp-includes\pluggable.php on line 1207
      Call Stack
      i ve used toolbox plugin
      How could i repair that
      Fred

    • #4795
      wickyd
      Member

      Same problem here.

      Doing this:
      See Warning illegal offset type.png

      Caused this:
      Warning: Illegal offset type in unset in /home/mysite/public_html/wp-includes/widgets.php on line 603

      Undoing this afterwards:
      See Cannot modify header information.png

      Caused this:
      Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/wp-includes/widgets.php:603) in /home/mysite/public_html/wp-includes/pluggable.php on line 1207

      Attachments:
      You must be logged in to view attached files.
    • #4862
      Steve
      Keymaster

      This is fixed in WP Helpers v1.9.1

Viewing 5 reply threads
  • The topic ‘warning error in dashboard’ is closed to new replies.