WordPress.org

Ready to get started?Download WordPress

Forums

Custom Taxonomies Menu Widget
[resolved] Bug: php in_array warning (12 posts)

  1. Nick Pelton
    Member
    Posted 2 years ago #

    Updated to the latest plugin and was receiving a in_array error: Second argument not proper type. Turns out the second argument was NULL.

    Might not be the best way, but simple fix by adding this check at line 155.

    // Check if null, if true make empty array
      				if($known_terms === NULL){
      					$known_terms = array();
      				}

    http://wordpress.org/extend/plugins/custom-taxonomies-menu-widget/

  2. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    Good catch!

    Actually, this error will only occur between upgrade of the plugin and the next time the widget form is saved. In other words, opening up the widget and clicking Save will clear the error.

    Nevertheless, I'm going to patch the code with your fix. Cheers!

  3. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    Just issued version 1.2.1 which fixes this bug.

    Thanks again for reporting it.

  4. justbishop
    Member
    Posted 2 years ago #

    Running version 1.2.1, still getting in_array errors:

    http://www.thepoleacademy.com/

    Opened the widget and clicked save. Did not help.

  5. redkite
    Member
    Posted 2 years ago #

    Same here, just did the 1.2.1 upgrade and now saving the widget doesn't help.

  6. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    Download a fresh copy of 1.2.1 from Extend. I did a silent upgrade shortly after updating to 1.2.1 to fix the error.
    http://wordpress.org/extend/plugins/custom-taxonomies-menu-widget/

  7. justbishop
    Member
    Posted 2 years ago #

    Just DL'd the new copy (from the link provided), uploaded via FTP (overwrote all files), and opened/re-saved the widget. No change :(

  8. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    I've just released 1.2.2 within the last 5 minutes.

  9. redkite
    Member
    Posted 2 years ago #

    Working fine now, thanks for the quick fix!

  10. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    Great! Thanks for posting back. :-)

  11. studiograsshopper
    Member
    Plugin Author

    Posted 2 years ago #

    PS: Please do me a favour and click "Works" in the Compatibility section here: http://wordpress.org/extend/plugins/custom-taxonomies-menu-widget/

    Thanks!

  12. redkite
    Member
    Posted 2 years ago #

    Done.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic