Title: Warning:
Last modified: August 20, 2016

---

# Warning:

 *  Resolved [yoramzara](https://wordpress.org/support/users/yoramzara/)
 * (@yoramzara)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/)
 * 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/](http://wordpress.org/extend/plugins/restrict-categories/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/warning-21/page/2/?output_format=md) [→](https://wordpress.org/support/topic/warning-21/page/2/?output_format=md)

 *  [RyanThaDude](https://wordpress.org/support/users/ryanthadude/)
 * (@ryanthadude)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550720)
 * I’m getting it too, and it’s causing problems while posting articles due to “
   Headers already sent”.
 *  [saintandrews](https://wordpress.org/support/users/saintandrews/)
 * (@saintandrews)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550838)
 * Same here. Reverted until fixed.
 *  [Contemplative Computing](https://wordpress.org/support/users/contemplative-computing/)
 * (@contemplative-computing)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550843)
 * Same here.
 *  [Contemplative Computing](https://wordpress.org/support/users/contemplative-computing/)
 * (@contemplative-computing)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550846)
 * 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](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550855)
 * 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?
 *  Thread Starter [yoramzara](https://wordpress.org/support/users/yoramzara/)
 * (@yoramzara)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550864)
 * 5.3.8
 *  [RyanThaDude](https://wordpress.org/support/users/ryanthadude/)
 * (@ryanthadude)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550865)
 * 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](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550887)
 * 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 ) )`
 *  Thread Starter [yoramzara](https://wordpress.org/support/users/yoramzara/)
 * (@yoramzara)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550888)
 * I am sot a coder. It is easier for me to stay with 2.5 that has no issues.
 *  Plugin Author [Matthew Muro](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550893)
 * 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.
 *  [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550903)
 * Same problem.
    I get this warning everywhere on my control panel.
 *  Plugin Author [Matthew Muro](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550904)
 * [@danicasati](https://wordpress.org/support/users/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.
 *  [Dani](https://wordpress.org/support/users/danicasati/)
 * (@danicasati)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550906)
 * Yes, it works.
    Could you patch this issue in next version?
 *  Plugin Author [Matthew Muro](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550909)
 * Cool, will do. Thanks for testing!
 *  Plugin Author [Matthew Muro](https://wordpress.org/support/users/mmuro/)
 * (@mmuro)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/#post-3550918)
 * 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)

1 [2](https://wordpress.org/support/topic/warning-21/page/2/?output_format=md) [→](https://wordpress.org/support/topic/warning-21/page/2/?output_format=md)

The topic ‘Warning:’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/restrict-categories.svg)
 * [Restrict Categories](https://wordpress.org/plugins/restrict-categories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/restrict-categories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-categories/reviews/)

 * 16 replies
 * 6 participants
 * Last reply from: [RyanThaDude](https://wordpress.org/support/users/ryanthadude/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/warning-21/page/2/#post-3550962)
 * Status: resolved