Open butter-and-salt opened 5 months ago
Hi,
Thanks for the report.
I'm afraid this is not a plugin related issue and your fix is not going to solve it. The function highlighted hooks linto the core walker_nav_menu_start_el, which is defined as:
apply_filters( 'walker_nav_menu_start_el', string $item_output, WP_Post $menu_item, int $depth, stdClass $args )
The second argument $item_output must be a string and string only. The issue here is that there is a null
element in the menu, therefore PHP throws a type error.
I suggest checkin the menu items, there might be a malfunctioning one as well as all 3rd party hooks to walker_nav_menu_start_el
, one of them is returning null
instead of ''.
Let me know if you have any updates on this.
PHP Fatal error: Uncaught TypeError: WPDRMS\ASP\NavMenu\Controller::handleMenuOutput(): Argument #1 ($item_output) must be of type string, null given, called in /XXX/wp-includes/class-wp-hook.php on line 326 and defined in /XXX/wp-content/plugins/ajax-search-pro/includes/classes/NavMenu/Controller.php:60
PHP Fatal error: Uncaught TypeError: WPDRMS\ASP\NavMenu\Controller::handleMenuOutput(): Return value must be of type string, null returned in /XXX/wp-content/plugins/ajax-search-pro/includes/classes/NavMenu/Controller.php:70
Fix: