Title: Error on PHP 8.0
Last modified: March 5, 2021

---

# Error on PHP 8.0

 *  [kimipooh](https://wordpress.org/support/users/kimipooh/)
 * (@kimipooh)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/error-on-php-8-0/)
 * WP-FFPC 1.11.2 does not work with PHP 8.0.
 * How to fix as follow:
 * wp-ffpc-class.php
    1016-1018 lines
 * [Before fixed]
 *     ```
       	public function plugin_options_migrate( &$options ) {
   
       		if ( version_compare ( $options['version'], $this->plugin_version, '<' )  ) {
       ```
   
 * [After fixed]
 *     ```
       	public function plugin_options_migrate( &$options ) {
       		if($options === false) $options = array('version' => '0.0');
       		if ( version_compare ( $options['version'], $this->plugin_version, '<' )  ) {
       ```
   
 * This is caused by the
 * wp-ffpc-abstract.php
    From line 514 public static function _get_option ( $optionID,
   $network = false ) {
 * In _get_options( $optionID, $network = false ), the return value $options has
   several patterns such as false (bool value), array, etc. When installing for 
   the first time, the WP-FFPC setting does not exist in the database used by WordPress,
   so the value of $options becomes false (bool value).
 * Then the following $options[‘version’] (public function plugin_options_migrate
   in wp-ffpc-class.php)
    ) will not exist ($options = false), and the first argument
   of version_compare will be false. However, since version_compare expects a string
   as an argument, a type mismatch will occur, and as of PHP 8.0, it is an error
   to do so.
 * Please fix the issue.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-on-php-8-0%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

 The topic ‘Error on PHP 8.0’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-ffpc_ffffff.svg)
 * [WP-FFPC](https://wordpress.org/plugins/wp-ffpc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ffpc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ffpc/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ffpc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ffpc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ffpc/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [kimipooh](https://wordpress.org/support/users/kimipooh/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/error-on-php-8-0/)
 * Status: not resolved