Too few arguments to function Responsive_Lightbox_Galleries::admin_post_thumbnai
-
Hi.
I had custom banners admin part not working because a problem with the interaction with the filter “admin_post_thumbnail_html” since I moved to the latest version of responsive lightbox (2.3.4).
Seems the filter “admin_post_thumbnail_html” expects 3 parameters instead of 2.
I managed to get custom banners admin part working again by changing the line 319 of custom_banners.php from:
echo apply_filters( ‘admin_post_thumbnail_html’, $content, $post->ID );
to:
echo apply_filters( ‘admin_post_thumbnail_html’, $content, $post->ID , null);The error message is as follows:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Responsive_Lightbox_Galleries::admin_post_thumbnail_html(), 2 passed in .../wp/wp-includes/class-wp-hook.php on line 307 and exactly 3 expected in .../wp/wp-content/plugins/responsive-lightbox/includes/class-galleries.php:4241 Stack trace: #0 .../wp/wp-includes/class-wp-hook.php(307): Responsive_Lightbox_Galleries->admin_post_thumbnail_html() #1 .../wp/wp-includes/plugin.php(189): WP_Hook->apply_filters() #2 .../wp/wp-content/plugins/custom-banners/custom-banners.php(319): apply_filters() #3 .../wp/wp-admin/includes/template.php(1395): CustomBannersPlugin->custom_banners_post_thumbnail_html() #4 .../wp/wp-admin/edit-form-advanced.php(688): do_meta_boxes() #5 .../wp/wp-admin/post.php(206): require('...') #6 {main} thrown in .../wp/wp-content/plugins/responsive-lightbox/includes/class-galleries.php on line 4241
The page I need help with: [log in to see the link]
- The topic ‘Too few arguments to function Responsive_Lightbox_Galleries::admin_post_thumbnai’ is closed to new replies.