Title: PHP 8 compatibility issue
Last modified: July 8, 2021

---

# PHP 8 compatibility issue

 *  [ant0nell0](https://wordpress.org/support/users/ant0nell0/)
 * (@ant0nell0)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-8-compatibility-issue/)
 * Dear, the plugin doesn’t work with PHP 8 due a deprecated method. Within /goodbarber/
   singletons/query.php there is a call to get_magic_quotes_gpc(), deprecated with
   PHP 8.
 * Since PHP no longer adds slashes to request parameters (removed in PHP 5.4), 
   get_magic_quotes_gpc() always returns false. With that in mind, the code don’t
   have to do a check to the string.
 * I’ve overcome the issue commenting the code like this:
 *     ```
       function strip_magic_quotes($value) {
           //if (get_magic_quotes_gpc()) {
             //return stripslashes($value);
           //} else {
             return $value;
           //}
         }
       ```
   
 * I’m asking for plugin update to solve the issue from your side.
    Best regards

The topic ‘PHP 8 compatibility issue’ is closed to new replies.

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

 * 0 replies
 * 1 participant
 * Last reply from: [ant0nell0](https://wordpress.org/support/users/ant0nell0/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/php-8-compatibility-issue/)
 * Status: not resolved