• Resolved Peja

    (@peja1389)


    I get this for every category on the edit screen.

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/mysite/public_html/wp-content/plugins/restrict-categories/restrict-categories.php on line 204

Viewing 7 replies - 16 through 22 (of 22 total)
  • oh it works! I redownloaded and applied the fix, the plugin now seem to work as intended.

    You have not to be sorry since you are here giving us your support, this make the plugin already better than others where developers never answer 🙂

    as a side note, just to know, is it normal that if I check the default wordpress category “Uncategorized” for any role, all the roles below get every category checked?

    I’m very grateful you helped me with this, if anything I can do to help with the plugin… I know css very well, or if you need something like translating it to Italian or Spanish you can contact me.

    Thank you!

    Plugin Author Matthew Muro

    (@mmuro)

    No, that’s not normal behavior.

    What browser and operating system are you on?

    windows 7 and xp under virtual machine

    Since I am web designer I have many browsers installed to test cross-browser compatibility, anyway I normally surf the internet on firefox..

    edit: I checked and it happens on ie, firefox, chrome and safary

    here is a screenshot:

    http://img802.imageshack.us/i/20543152.jpg/

    I checked only the category “Uncategorized” for the Editor, once I saved every other category for the roles below get checked and I have to manually remove the check and save again

    is not a big issue anyway.. 🙂

    Plugin Author Matthew Muro

    (@mmuro)

    It’s not limited to browser or OS. From testing, it looks like my “fix” for the error the original poster broke the logic for the check boxes.

    You can try replacing lines 213-218 with the follow and see if it works.

    if ( is_array($settings[ $id ]) && in_array( $option, $settings[ $id ] ) )
    $checked = 'checked="checked"';
    else
    $checked = '';

    I don’t get any errors with this on PHP 5.2 or 5.3, so I’m hoping this is the “real” fix.

    yes! that worked, the strange behavior is gone, and no error is showing, categories are being restricted, everything seems perfect now.

    I’ll continue working on this site on the next days and will continue testing your plugin, I’ll let you know if something else appear.

    Thank you again, both for the plugin and your help 🙂

    Plugin Author Matthew Muro

    (@mmuro)

    Awesome. Glad we could troubleshoot this.

    I won’t have an official release to correct these bugs until after the US holidays (next week). Let me know if you find any other problems with it, though!

Viewing 7 replies - 16 through 22 (of 22 total)

The topic ‘[Plugin: Restrict Categories] Error when using plugin…’ is closed to new replies.