Title: PHP 8+ plugin breaks site
Last modified: June 17, 2024

---

# PHP 8+ plugin breaks site

 *  Resolved [iontulburedev](https://wordpress.org/support/users/iontulburedev/)
 * (@iontulburedev)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-8-plugin-breaks-site/)
 * On PHP 7.4 i get the following errors : 
   `**Deprecated**: Methods with the same
   name as their class will not be constructors in a future version of PHP; adrotate_widgets
   has a deprecated constructor in **/home/user/domains/site.xyz/public_html/wp-
   content/plugins/adrotate-pro/adrotate-widget.php** on line **20**`
 * `**Deprecated**: Function create_function() is deprecated in **/home/user/domains/
   site.xyz/public_html/wp-content/plugins/adrotate-pro/adrotate.php** on line **
   59**`
   But if i switch to PHP 8+ (8.1) i get these errors and site breaks : `**
   Deprecated**: Optional parameter $group declared before required parameter $responsive
   is implicitly treated as a required parameter in **/home/user/domains/site.xyz/
   public_html/wp-content/plugins/adrotate-pro/adrotate-output.php** on line **540**`
 * `**Fatal error**: Uncaught Error: Call to undefined function create_function()
   in /home/user/domains/site.xyz/public_html/wp-content/plugins/adrotate-pro/adrotate.
   php:59 Stack trace: #0 /home/user/domains/site.xyz/public_html/wp-settings.php(
   517): include_once() #1 /home/user/domains/site.xyz/public_html/wp-config.php(
   123): require_once('/home/user...') #2 /home/user/domains/site.xyz/public_html/
   wp-load.php(50): require_once('/home/user...') #3 /home/user/domains/site.xyz/
   public_html/wp-admin/admin.php(34): require_once('/home/user...') #4 /home/user/
   domains/site.xyz/public_html/wp-admin/index.php(10): require_once('/home/user...')#
   5 {main} thrown in /home/user/domains/site.xyz/public_html/wp-content/plugins/
   adrotate-pro/adrotate.php on line 59`
 * This needs to be fixed. Best regards !
    -  This topic was modified 1 year, 11 months ago by [iontulburedev](https://wordpress.org/support/users/iontulburedev/).

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

 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-8-plugin-breaks-site/#post-17830744)
 * What version of AdRotate Pro do you have?
 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/php-8-plugin-breaks-site/#post-17853040)
 * While I waited for your reply about the version I checked the code. None of the
   errors match up with lines of code in the current version.
 * So perhaps start with updating the plugin to the latest version.
    PHP8 support
   was added quite a while ago, and has been updated over time.
 * If you’ve found something wrong with PHP8 or 8.2 that I missed and have better
   errors/things to look at I’ll be happy to.
    -  This reply was modified 1 year, 11 months ago by [Arnan](https://wordpress.org/support/users/adegans/).

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

The topic ‘PHP 8+ plugin breaks site’ is closed to new replies.

 * ![](https://ps.w.org/adrotate/assets/icon-256x256.gif?rev=3117289)
 * [AdRotate Banner Manager](https://wordpress.org/plugins/adrotate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adrotate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adrotate/)
 * [Active Topics](https://wordpress.org/support/plugin/adrotate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adrotate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adrotate/reviews/)

## Tags

 * [create_function](https://wordpress.org/support/topic-tag/create_function/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 2 replies
 * 2 participants
 * Last reply from: [Arnan](https://wordpress.org/support/users/adegans/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/php-8-plugin-breaks-site/#post-17853040)
 * Status: resolved