PHP Fatal error: Uncaught TypeError: implode()
-
Throws the following fatal:
PHP Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /srv/htdocs/wp-content/plugins/facebook-pagelike-widget/fb_class.php:42Can you add better data type checks instead of assuming it’s an array?
-
Similar error with PHP 8.3:
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /var/www/html/web/wp-content/plugins/facebook-pagelike-widget_/fb_class.php:42 Stack trace: #0 /var/www/html/web/wp-content/plugins/facebook-pagelike-widget_/fb_class.php(42): implode() #1 /var/www/html/web/wp-includes/class-wp-widget.php(394): facebook_widget->widget() #2 /var/www/html/web/wp-includes/widgets.php(845): WP_Widget->display_callback() #3 /var/www/html/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_widget_sidebar.php(27): dynamic_sidebar() #4 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(457): require(‘/var/www/html/d…’) #5 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(430): WPBakeryShortCode->loadTemplate() #6 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(552): WPBakeryShortCode->content() #7 /var/www/html/web/wp-content/plugins/js_composer/include/helpers/helpers.php(1371): WPBakeryShortCode->output() #8 /var/www/html/web/wp-includes/shortcodes.php(434): vc_do_shortcode() #9 [internal function]: do_shortcode_tag() #10 /var/www/html/web/wp-includes/shortcodes.php(273): preg_replace_callback() #11 /var/www/html/web/wp-content/plugins/js_composer/include/helpers/helpers.php(318): do_shortcode() #12 /var/www/html/web/wp-content/plugins/js_composer/include/templates/shortcodes/vc_column.php(94): wpb_js_remove_wpautop() #13 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(457): require(‘/var/www/html/d…’) #14 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(430): WPBakeryShortCode->loadTemplate() #15 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(552): WPBakeryShortCode->content() #16 /var/www/html/web/wp-content/plugins/js_composer/include/helpers/helpers.php(1371): WPBakeryShortCode->output() #17 /var/www/html/web/wp-includes/shortcodes.php(434): vc_do_shortcode() #18 [internal function]: do_shortcode_tag() #19 /var/www/html/web/wp-includes/shortcodes.php(273): preg_replace_callback() #20 /var/www/html/web/wp-content/plugins/js_composer/include/helpers/helpers.php(318): do_shortcode() #21 /var/www/html/web/wp-content/themes/onair2/vc_templates/vc_row.php(187): wpb_js_remove_wpautop() #22 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(457): require(‘/var/www/html/d…’) #23 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/vc-row.php(40): WPBakeryShortCode->loadTemplate() #24 /var/www/html/web/wp-content/plugins/js_composer/include/classes/shortcodes/core/class-wpbakeryshortcode.php(552): WPBakeryShortCode_Vc_Row->content() #25 /var/www/html/web/wp-content/plugins/js_composer/include/helpers/helpers.php(1371): WPBakeryShortCode->output() #26 /var/www/html/web/wp-includes/shortcodes.php(434): vc_do_shortcode() #27 [internal function]: do_shortcode_tag() #28 /var/www/html/web/wp-includes/shortcodes.php(273): preg_replace_callback() #29 /var/www/html/web/wp-includes/class-wp-hook.php(324): do_shortcode() #30 /var/www/html/web/wp-includes/plugin.php(205): WP_Hook->apply_filters() #31 /var/www/html/web/wp-includes/post-template.php(256): apply_filters() #32 /var/www/html/web/wp-content/themes/onair2/page-fullwidth.php(38): the_content() #33 /var/www/html/web/wp-includes/template-loader.php(106): include(‘/var/www/html/d…’) #34 /var/www/html/web/wp-blog-header.php(19): require_once(‘/var/www/html/d…’) #35 /var/www/html/web/index.php(17): require(‘/var/www/html/d…’) #36 {main} thrown in /var/www/html/web/wp-content/plugins/facebook-pagelike-widget_/fb_class.php on line 42
Hi @mtg169 @wfrmitstaff I have just fixed above issue. Kindly update the plugin and check again. Please let me know if any issues.
The topic ‘PHP Fatal error: Uncaught TypeError: implode()’ is closed to new replies.