Title: Uncaught TypeError with PHP8
Last modified: October 20, 2021

---

# Uncaught TypeError with PHP8

 *  Resolved [isarisar](https://wordpress.org/support/users/isarisar/)
 * (@isarisar)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-with-php8/)
 * Searching for a shortcode immediately fails (PHP 8.0.10) with:
 *     ```
       CRITICAL Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, string given in …/wp-content/plugins/shortcodes-finder/includes/shortcodes-finder-utils.php:301
       Stack trace:
       #0 …/wp-content/plugins/shortcodes-finder/includes/shortcodes-finder-utils.php(231): sf_admin_page_shortcode_origin()
       #1 …/wp-content/plugins/shortcodes-finder/admin/partials/shortcodes-finder-admin-display.php(172): sf_get_shortcodes_ordered()
       #2 …/wp-content/plugins/shortcodes-finder/admin/partials/shortcodes-finder-admin-display.php(64): sf_admin_page_find_shortcode_handler()
       #3 …/wp-includes/class-wp-hook.php(303): sf_admin_page_handler()
       #4 …/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
       #5 …/wp-includes/plugin.php(470): WP_Hook->do_action()
       #6 …/wp-admin/admin.php(259): do_action()
       #7 …/wp-admin/tools.php(40): require_once('...')
       #8 {main}
         thrown in …/wp-content/plugins/shortcodes-finder/includes/shortcodes-finder-utils.php in line 301
       ```
   

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

 *  Plugin Author [Scribit](https://wordpress.org/support/users/scribit/)
 * (@scribit)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-with-php8/#post-15008050)
 * Hello [@isarisar](https://wordpress.org/support/users/isarisar/) and thanks for
   your thread.
    I’ve tried on a real PHP 8.0.11 website, with a lot of shortcodes(
   ~100), and it works correctly.
 * Can you try to search, from the “Find by shortcode” tab, for some specific shortcodes
   calls, selecting them from dropdown and pressing button? (so don’t use the “All”
   menu item). Do you have the error for each of the shortcodes searched?
    Maybe
   the issue come from a specific plugin.
 *  Plugin Author [Scribit](https://wordpress.org/support/users/scribit/)
 * (@scribit)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-with-php8/#post-15028066)
 * Marked as resolved after some succesfully tests and no answer from user.

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

The topic ‘Uncaught TypeError with PHP8’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-finder/assets/icon-256x256.png?rev=2305831)
 * [Shortcodes Finder](https://wordpress.org/plugins/shortcodes-finder/)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-finder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-finder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-finder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-finder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Scribit](https://wordpress.org/support/users/scribit/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/uncaught-typeerror-with-php8/#post-15028066)
 * Status: resolved