Title: PHP Fatal error: Uncaught TypeError: implode()
Last modified: May 31, 2025

---

# PHP Fatal error: Uncaught TypeError: implode()

 *  Resolved [mtg169](https://wordpress.org/support/users/mtg169/)
 * (@mtg169)
 * [12 months ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-implode-2/)
 * Throws the following fatal:
 *     ```wp-block-code
       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:42
       ```
   
 * Can you add better data type checks instead of assuming it’s an array?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [WFRM IT Staff](https://wordpress.org/support/users/wfrmitstaff/)
 * (@wfrmitstaff)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-implode-2/#post-18705161)
 * 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
 *  Plugin Author [Milap](https://wordpress.org/support/users/milap/)
 * (@milap)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-implode-2/#post-18711539)
 * Hi [@mtg169](https://wordpress.org/support/users/mtg169/) [@wfrmitstaff](https://wordpress.org/support/users/wfrmitstaff/)
   I have just fixed above issue. Kindly update the plugin and check again. Please
   let me know if any issues.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Fatal error: Uncaught TypeError: implode()’ is closed to new replies.

 * ![](https://ps.w.org/facebook-pagelike-widget/assets/icon-256x256.png?rev=3518584)
 * [Buttonizer - Social Media Share Buttons, Social Icons, & Social Feeds](https://wordpress.org/plugins/facebook-pagelike-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/facebook-pagelike-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-pagelike-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-pagelike-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-pagelike-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-pagelike-widget/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [Milap](https://wordpress.org/support/users/milap/)
 * Last activity: [6 months, 2 weeks ago](https://wordpress.org/support/topic/php-fatal-error-uncaught-typeerror-implode-2/#post-18711539)
 * Status: resolved