Skip to content

Commit 6c7d59b

Browse files
author
Fifciuu
committed
Isset for sure
1 parent 9432966 commit 6c7d59b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-rest-api-v2-menus.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function wp_api_v2_menus_get_menu_items( $id ) {
145145
// add slug to menu items
146146
$slug = basename( get_permalink($item->object_id) );
147147
$item->slug = $slug;
148-
if ($item->thumbnail_id) {
148+
if (isset($item->thumbnail_id) && $item->thumbnail_id) {
149149
$item->thumbnailSrc = wp_get_attachment_image_url($item->thumbnail_id, 'post-thumbnail');
150150
}
151151
} else if($item->type == 'taxonomy') {

0 commit comments

Comments
 (0)