Title: PHP Warnings in toggle-blocks.php
Last modified: February 5, 2026

---

# PHP Warnings in toggle-blocks.php

 *  Resolved [Paul Wong-Gibbs](https://wordpress.org/support/users/djpaul/)
 * (@djpaul)
 * [4 months ago](https://wordpress.org/support/topic/php-warnings-in-toggle-blocks-php/)
 * Hello!
 * It is possible for a PHP warning to occur in the following location. Tested on
   PHP 8.2:
 * `PHP Warning:  Trying to access array offset on value of type bool in wp-content/
   plugins/megamenu-pro/toggle-blocks/toggle-blocks.php on line 94`
 * It relates to a call to `wp_get_attachment_image_src()` that assumes the call
   never returns `false` – which it can, given unexpected edge cases.

Viewing 1 replies (of 1 total)

 *  Plugin Support [megatom](https://wordpress.org/support/users/megatom/)
 * (@megatom)
 * [4 months ago](https://wordpress.org/support/topic/php-warnings-in-toggle-blocks-php/#post-18816323)
 * Hi Paul,
 * Thanks for reporting this. I’ll add a fix in the next update. In the mean time
   please check any logo toggle blocks you have, and make sure the media file associated
   with them hasn’t been deleted.
 * Regards,
   Tom

Viewing 1 replies (of 1 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warnings-in-toggle-blocks-php%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/megamenu/assets/icon-128x128.png?rev=1489843)
 * [Max Mega Menu](https://wordpress.org/plugins/megamenu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/megamenu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/megamenu/)
 * [Active Topics](https://wordpress.org/support/plugin/megamenu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/megamenu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/megamenu/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [megatom](https://wordpress.org/support/users/megatom/)
 * Last activity: [4 months ago](https://wordpress.org/support/topic/php-warnings-in-toggle-blocks-php/#post-18816323)
 * Status: resolved