Title: Polylang switcher compatibility
Last modified: April 1, 2020

---

# Polylang switcher compatibility

 *  Resolved [fkoomek](https://wordpress.org/support/users/fkoomek/)
 * (@fkoomek)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/)
 * Hello.
    I am getting this in my error log: [01-Apr-2020 23:39:42 UTC] PHP Notice:
   Trying to get property ‘thumbnail_id’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 523 [01-Apr-2020 23:39:42 UTC] PHP Notice: 
   Trying to get property ‘image_size’ of non-object in /…/wp-content/plugins/menu-
   image/menu-image.php on line 525 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying
   to get property ‘title_position’ of non-object in /…/wp-content/plugins/menu-
   image/menu-image.php on line 526 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying
   to get property ‘thumbnail_id’ of non-object in /…/wp-content/plugins/menu-image/
   menu-image.php on line 528 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get
   property ‘thumbnail_hover_id’ of non-object in /…/wp-content/plugins/menu-image/
   menu-image.php on line 530 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get
   property ‘thumbnail_id’ of non-object in /…/wp-content/plugins/menu-image/menu-
   image.php on line 543 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property‘
   thumbnail_id’ of non-object in /…/wp-content/plugins/menu-image/menu-image.php
   on line 523 [01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘image_size’
   of non-object in /…/wp-content/plugins/menu-image/menu-image.php on line 525 [
   01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘title_position’
   of non-object in /…/wp-content/plugins/menu-image/menu-image.php on line 526 [
   01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘thumbnail_id’ of
   non-object in /…/wp-content/plugins/menu-image/menu-image.php on line 528 [01-
   Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘thumbnail_hover_id’
   of non-object in /…/wp-content/plugins/menu-image/menu-image.php on line 530 [
   01-Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘thumbnail_id’ of
   non-object in /…/wp-content/plugins/menu-image/menu-image.php on line 543 [01-
   Apr-2020 23:39:42 UTC] PHP Notice: Trying to get property ‘thumbnail_id’ of non-
   object in /…/wp-content/plugins/menu-image/menu-image.php on line 523 [01-Apr-
   2020 23:39:42 UTC] PHP Notice: Trying to get property ‘image_size’ of non-object
   in /…/wp-content/plugins/menu-image/menu-image.php on line 525 [01-Apr-2020 23:
   39:42 UTC] PHP Notice: Trying to get property ‘title_position’ of non-object 
   in /…/wp-content/plugins/menu-image/menu-image.php on line 526 [01-Apr-2020 23:
   39:42 UTC] PHP Notice: Trying to get property ‘thumbnail_id’ of non-object in/…/
   wp-content/plugins/menu-image/menu-image.php on line 528 [01-Apr-2020 23:39:42
   UTC] PHP Notice: Trying to get property ‘thumbnail_hover_id’ of non-object in/…/
   wp-content/plugins/menu-image/menu-image.php on line 530 [01-Apr-2020 23:39:42
   UTC] PHP Notice: Trying to get property ‘thumbnail_id’ of non-object in /…/wp-
   content/plugins/menu-image/menu-image.php on line 543 [01-Apr-2020 23:39:42 UTC]
   PHP Notice: Trying to get property ‘thumbnail_id’ of non-object in /…/wp-content/
   plugins/menu-image/menu-image.php on line 523 [01-Apr-2020 23:39:42 UTC] PHP 
   Notice: Trying to get property ‘image_size’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 525 [01-Apr-2020 23:39:42 UTC] PHP Notice: 
   Trying to get property ‘title_position’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 526 [01-Apr-2020 23:39:42 UTC] PHP Notice: 
   Trying to get property ‘thumbnail_id’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 528 [01-Apr-2020 23:39:42 UTC] PHP Notice: 
   Trying to get property ‘thumbnail_hover_id’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 530 [01-Apr-2020 23:39:42 UTC] PHP Notice: 
   Trying to get property ‘thumbnail_id’ of non-object in /…/wp-content/plugins/
   menu-image/menu-image.php on line 543
 * By debugging I found out that this notice starts to appear when I use Polylang
   language switcher as a menu item. When I remove it, it’s ok.
    Can you please 
   check that? Thanks
    -  This topic was modified 6 years, 1 month ago by [fkoomek](https://wordpress.org/support/users/fkoomek/).

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12627249)
 * Hi [@fkoomek](https://wordpress.org/support/users/fkoomek/),
 * That is just a notice and not an error itself, you can disable the debug mode
   to avoid seeing those. Not sure what Polylang does in their menu items that cause
   this conflict.
 *  [theking2](https://wordpress.org/support/users/theking2/)
 * (@theking2)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12649584)
 * If you could modify menu-image.php#524 to
    if ( gettype( $item ) !== “string”&&”!
   == $item->thumbnail_id ) {
 * this problem goes away.
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12649846)
 * Hi [@theking2](https://wordpress.org/support/users/theking2/),
 * We released an update 2 days ago where we fixed that line due to some changes
   that happened in WordPress 5.4
 * Can you try the latest version?
 *  Thread Starter [fkoomek](https://wordpress.org/support/users/fkoomek/)
 * (@fkoomek)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12661401)
 * Hello.
    After update the notice still remains.
    -  This reply was modified 6 years, 1 month ago by [fkoomek](https://wordpress.org/support/users/fkoomek/).
 *  [theking2](https://wordpress.org/support/users/theking2/)
 * (@theking2)
 * [6 years ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12670590)
 * updated to version 2.9.6. has the same bug. corrected this in line 525
    `if (
   gettype( $item ) !== "string" && '' !== $item->thumbnail_id && $item->thumbnail_id
   > 0 ) {`
    -  This reply was modified 6 years ago by [theking2](https://wordpress.org/support/users/theking2/).
 *  Plugin Author [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * (@takanakui)
 * [6 years ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12724623)
 * Thanks [@theking2](https://wordpress.org/support/users/theking2/) will include
   that change in the next update.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Polylang switcher compatibility’ is closed to new replies.

 * ![](https://ps.w.org/menu-image/assets/icon-128x128.png?rev=2123398)
 * [Menu Image, Icons made easy](https://wordpress.org/plugins/menu-image/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/menu-image/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/menu-image/)
 * [Active Topics](https://wordpress.org/support/plugin/menu-image/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/menu-image/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/menu-image/reviews/)

## Tags

 * [change request](https://wordpress.org/support/topic-tag/change-request/)

 * 6 replies
 * 3 participants
 * Last reply from: [Rui Guerreiro](https://wordpress.org/support/users/takanakui/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/polylang-switcher-compatibility/#post-12724623)
 * Status: resolved