• Resolved Ov3rfly

    (@ov3rfly)


    Menu Icons 0.13.2 and WordPress 6.1.1 causes many of these entries in error log on a client website:

    PHP Warning:  Undefined array key "label" in ../wp-admin/includes/media.php on line 1987

    Problem is this in vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php at line 508 in a function “Add promo to attachment modal” where no label is defined.

    $fields['optimole'] = array(
    	'input' => 'html',
    	'html'  => '<div id="ti-optml-notice-helper"></div>',
    );

    Fields added via attachment_fields_to_edit filter should contain a label – at least similar to this:

    $fields['optimole'] = array(
    	'input' => 'html',
    	'html'  => '<div id="ti-optml-notice-helper"></div>',
    	'label'  => ''
    );

    Maybe similar issue as described here (not sure why that issue is currently marked as resolved).

    Feel free to mark this issue as resolved after a plugin update with a fix has been released, not before, thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Stefan Cotitosu

    (@stefancotitosu)

    Hi @ov3rfly,

    Thank you for using Menu Icons, and I’m sorry to hear about the difficulties encountered.

    I’ve tested the plugin on an instance with WordPress 6.1.1, PHP 8.1 and two themes Neve, and Twenty Twenty-One, and I can’t replicate the issue.

    Would it be possible to share more details about the theme you are using and the PHP version?

    Regards,
    Stefan

    Thread Starter Ov3rfly

    (@ov3rfly)

    • Install fresh WordPress 6.1.1, PHP 8.1, any theme
    • Activate WP_DEBUG_LOG
    • Install & activate Menu Icons 0.13.2
    • Upload image to Media Library or edit image in Media Library
    • Check wp-content/debug.log and find this:
    PHP Warning: Undefined array key "label" in ../wp-admin/includes/media.php on line 1983
    Thread Starter Ov3rfly

    (@ov3rfly)

    Found an additional issue with WordPress 6.1.1, PHP 8.1, Menu Icons 0.13.2

    PHP Deprecated:  Automatic conversion of false to array is deprecated in ../menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php on line 323

    This happens if transient themeisle_sdk_feed_items is expired/not set, then variable $items_normalized is set to false but used later as array $items_normalized[] = ... for some feed items.

    Plugin Support Vytis

    (@bvytis)

    Hi @ov3rfly,

    Thanks for sharing more details. I followed all the steps you provided with mentioned version of plugin and PHP, WordPress but I don’t get same warnings in debug mode.

    I shared the information with our development team, I hope they will find something from the information provided.

    Thread Starter Ov3rfly

    (@ov3rfly)

    Issues could be 100% replicated as described above.

    Your development team obviously was able to replicate and has fixed both.

    Hi @ov3rfly!

    The first issue you mentioned was already solved in a previous version of the plugin (0.13.3) and the second one was related to PHP 8.1 and it was fixed in the latest version.

    Have a nice day!

    Thread Starter Ov3rfly

    (@ov3rfly)

    Issues had already been reported for Menu Icons 0.13.2.

    Plugin support was unable to replicate issues despite clear instructions, no feedback at all has been provided about the fixes and the fixes are not mentioned in changelog for 0.13.3 and 0.13.4.

    Had to compare code myself and confirm fixes now here for other readers.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Warning: Undefined array key “label” …’ is closed to new replies.