Describe the bug
I install the theme in an empty wordpress with wp cli and some warnings appear in the footer (see screenshots).
I've also installed all the required plugins.
To Reproduce
Steps to reproduce the behavior:
Install wordpress with wp cli (wp core download, config and install)
Install the theme and activate it : wp theme install https://github.com/amnestywebsite/humanity-theme/releases/download/v2.0.8/humanity-theme.zip --activate
Additional context
The warnings seems to be related to the $menu variable in the function amnesty_get_nav_menu_items
in navigation.php. The value of the variable can be false because this is not checked beforehand.
I suggest : $menu_items = $menu ? wp_get_nav_menu_items( $menu->term_id, [ 'update_post_term_cache' => false ] ) : []; at the line 147 in navigation.php to check the value of $menu.
Describe the bug
I install the theme in an empty wordpress with
wp cli
and some warnings appear in the footer (seescreenshots
). I've also installed all the required plugins.To Reproduce
Steps to reproduce the behavior:
wp cli
(wp core download, config and install)wp theme install https://github.com/amnestywebsite/humanity-theme/releases/download/v2.0.8/humanity-theme.zip --activate
wp server
http://localhost:8080
Expected behaviour
No warnings
Actual behaviour
Warnings appear in footer
Screenshots
Platform:
I actually work on localhost
Additional context
The warnings seems to be related to the
$menu
variable in the functionamnesty_get_nav_menu_items
innavigation.php
. The value of the variable can be false because this is not checked beforehand.I suggest :
$menu_items = $menu ? wp_get_nav_menu_items( $menu->term_id, [ 'update_post_term_cache' => false ] ) : [];
at the line 147 innavigation.php
to check the value of$menu
.