Support » Plugin: Restrict Categories » Warning:

  • Resolved yoramzara

    (@yoramzara)


    This is the message I got when I upgraded the plugin now

    Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/avelim2/public_html/wp-content/plugins/restrict-categories/restrict-categories.php on line 442

    Warning: array_values() expects parameter 1 to be array, null given in

    What is this?

    http://wordpress.org/extend/plugins/restrict-categories/

Viewing 15 replies - 1 through 15 (of 16 total)
  • I’m getting it too, and it’s causing problems while posting articles due to “Headers already sent”.

    Same here. Reverted until fixed.

    Contemplative Computing

    (@contemplative-computing)

    Same here.

    Contemplative Computing

    (@contemplative-computing)

    I commented out the problem clause and everything seems to be working okay for now. Will look out for an update.

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    What PHP version are you using and in what scenarios can this be reproduced?

    I tried this on PHP 5.2.17 and 5.3.5 and could not get this error. I went through and saved categories for Roles and Users, checked the Posts screen, added a Post, reset the settings. Am I missing something?

    5.3.8

    My host is using 5.3.15 and my local Ubuntu test server is using 5.4.6. The error would only appear in /wp-admin. I also reverted back on my production server and the error went away.

    EDIT: I just tested it on my test server and the warning appears at the top of every page in /wp-admin. Making any changes causes “Headers already sent” and the page fails to load.

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    You can try replacing line 441 with the following and see if the error goes away:
    if ( is_array( $settings_user ) && array_key_exists( $user_login . '_user_cats', $settings_user ) )

    I am sot a coder. It is easier for me to stay with 2.5 that has no issues.

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    I understand. It’s just a single line, though and you’d be helping out others with similar problems.

    If someone else wants to test this, I’d appreciate it.

    Same problem.
    I get this warning everywhere on my control panel.

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    @danicasati, what PHP version are you running? If you can try replacing line 441 with the above code to see if that works, that’d help.

    Yes, it works.
    Could you patch this issue in next version?

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    Cool, will do. Thanks for testing!

    Plugin Author Matthew Muro

    (@mmuro)

    Member

    The fix has been integrated in 2.6.1, so give that a try and let me know if it doesn’t work.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Warning:’ is closed to new replies.