Title: PHP8 compatibility
Last modified: May 10, 2022

---

# PHP8 compatibility

 *  Resolved [Mikel King](https://wordpress.org/support/users/vizkr/)
 * (@vizkr)
 * [4 years ago](https://wordpress.org/support/topic/php8-compatibility-16/)
 * Observed the following fatal when running under PHP8. This causes a failure in
   the QR code generation and display in the CMS. Reverting back to PHP7.4 fixes
   the issue.
 *     ```
       [10-May-2022 12:16:19 UTC] PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /nas/content/live/hmmdev/wp-content/plugins/google-authenticator/google-authenticator.php:711
       Stack trace:
       #0 /nas/content/live/hmmdev/wp-content/plugins/google-authenticator/google-authenticator.php(365): GoogleAuthenticator->profile_personal_options(Array)
       #1 /nas/content/live/hmmdev/wp-includes/class-wp-hook.php(307): GoogleAuthenticator->user_setup_page('')
       #2 /nas/content/live/hmmdev/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)
       #3 /nas/content/live/hmmdev/wp-includes/plugin.php(474): WP_Hook->do_action(Array)
       #4 /nas/content/live/hmmdev/wp-admin/admin.php(259): do_action('admin_page_goog...')
       #5 {main}
         thrown in /nas/content/live/hmmdev/wp-content/plugins/google-authenticator/google-authenticator.php on line 711
       ```
   

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

 *  [Oleksiy](https://wordpress.org/support/users/evinak/)
 * (@evinak)
 * [4 years ago](https://wordpress.org/support/topic/php8-compatibility-16/#post-15656029)
 * Same bug described [here](https://wordpress.org/support/topic/bug-exception-thrown-for-multisite-due-to-incorrect-count-function-bracket/).
 *  Plugin Author [Ivan](https://wordpress.org/support/users/ivankk/)
 * (@ivankk)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/php8-compatibility-16/#post-15793777)
 * Hi [@vizkr](https://wordpress.org/support/users/vizkr/)
    I’ve pushed a new version
   0.54 with a fix.
 *  Thread Starter [Mikel King](https://wordpress.org/support/users/vizkr/)
 * (@vizkr)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/php8-compatibility-16/#post-15809221)
 * Thanks [@ivankk](https://wordpress.org/support/users/ivankk/)
 * I have deployed this to our production environment and confirmed with PHP8.

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

The topic ‘PHP8 compatibility’ is closed to new replies.

 * ![](https://ps.w.org/google-authenticator/assets/icon-256x256.png?rev=3500822)
 * [Google Authenticator](https://wordpress.org/plugins/google-authenticator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-authenticator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-authenticator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-authenticator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-authenticator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-authenticator/reviews/)

## Tags

 * [PHP Fatal error](https://wordpress.org/support/topic-tag/php-fatal-error/)

 * 3 replies
 * 3 participants
 * Last reply from: [Mikel King](https://wordpress.org/support/users/vizkr/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/php8-compatibility-16/#post-15809221)
 * Status: resolved