Critical error with FoundationPress
Hi,
I just wanted to pass along a critical issue I ran into while running updates to your plugin. I realize this is specific to a custom theme so I don’t expect a patch but just thought you should be aware as it’s related to FoundationPress.
I removed the code in my instance and no longer have an issue but thought I’d let you know the details.
The following code:
// Add Foundation 'active' class for the current menu item.
if ( ! function_exists( 'foundationpress_active_nav_class' ) ) :
function foundationpress_active_nav_class( $classes, $item ) {
if ( 1 == $item->current || true == $item->current_item_ancestor ) {
$classes[] = 'active';
}
return $classes;
}
add_filter( 'nav_menu_css_class', 'foundationpress_active_nav_class', 10, 2 );
endif;
Results in the following critical error:
PHP Fatal error: Uncaught Error: [] operator not supported for strings in /nas/content/live/rigado/wp-content/themes/rigado/library/foundation.php:69
Stack trace:
#0 /nas/content/live/rigado/wp-includes/class-wp-hook.php(326): foundationpress_active_nav_class('menu-item menu-...', Object(WP_Post))
#1 /nas/content/live/rigado/wp-includes/plugin.php(205): WP_Hook->apply_filters('menu-item menu-...', Array)
#2 /nas/content/live/rigado/wp-content/plugins/brizy-pro/content/placeholders/menu-item-property.php(26): apply_filters('nav_menu_css_cl...', 'menu-item menu-...', Object(WP_Post), false, false)
#3 /nas/content/live/rigado/wp-content/plugins/brizy/vendor/bagrinsergiu/content-placeholder/lib/Replacer.php(66): BrizyPro_Content_Placeholders_MenuItemProperty->getValue(Object(Brizy_Content_Context), Object(BrizyPlaceholders\ContentPlaceholder))
#4 /nas/content/live/rigado/wp-content/plugins/brizy/vendor/bagrinsergiu/content-placeholder/lib/Replacer.php(44): BrizyPlaceholders\Replacer->replaceWithExtractedData(Array, Array, '<li da in /nas/content/live/rigado/wp-content/themes/rigado/library/foundation.php on line 69
Just an FYI.
Cheers
0
Please sign in to leave a comment.
Comments
0 comments