Support » Plugin: List Custom Taxonomy Widget » Undefined Index Errors

  • This plugin is throwing undefined index errors for various components of the widget.

    [09-Aug-2017 00:31:08 UTC] PHP Notice: Undefined index: title in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 217

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    Do you still get errors when you remove and re-add a widget? Or is this when you first add an instance?

    It happens whenever the widget simply exists in a sidebar in the widgets admin. The errors dump to my PHP error log. I can actually see it reported by PHP with WP_DEBUG with a fresh widget instance.

    
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: title in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 217
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: taxonomy in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 218
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: orderby in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 219
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: ascdsc in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 220
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: exclude in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 221
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: expandoptions in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 222
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532
    [18-Aug-2017 02:49:20 UTC] PHP Notice:  Undefined index: childof in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 223
    [18-Aug-2017 02:49:20 UTC] PHP   7. lc_taxonomy->form() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:532

    The following appear in the PHP error log with a fresh instance, WP_DEBUG reveals more though (more of the fields):

    [18-Aug-2017 02:53:40 UTC] PHP Notice:  Undefined index: taxonomy in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 174
    [18-Aug-2017 02:53:40 UTC] PHP   9. lc_taxonomy->update() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:456
    [18-Aug-2017 02:53:40 UTC] PHP Notice:  Undefined index: ascdsc in /Applications/MAMP/htdocs/mysite/wp-content/plugins/list-custom-taxonomy-widget/list-custom-taxonomy-widget.php on line 176
    [18-Aug-2017 02:53:40 UTC] PHP   9. lc_taxonomy->update() /Applications/MAMP/htdocs/mysite/wp-includes/class-wp-widget.php:456

    You might have to check if the index in the array has a value !empty() etc to fix it.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.