Title: Unable to activate plugin: PHP error
Last modified: November 9, 2020

---

# Unable to activate plugin: PHP error

 *  Resolved [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/)
 * Unfortunately I’m unable to activate the plugin. WordPress is throwing a fatal
   error and my PHP error.log is reporting:
 *     ```
       [09-Nov-2020 17:30:38 UTC] PHP Parse error:  syntax error, unexpected ')' in example.com/wp-content/plugins/draft-concluder/inc/setup.php on line 29
       [09-Nov-2020 17:30:38 UTC] PHP Parse error:  syntax error, unexpected ')' in example.com/wp-content/plugins/draft-concluder/inc/setup.php on line 29
       ```
   
 * I have very quickly glanced the code (the array_merge statement) but couldn’t
   see myself why the parentheses is unexpected. My editor is correctly folding 
   all blocks.

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

 *  Thread Starter [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13640252)
 * 5 mins later … solved when I remove the last comma on line 28.
    I am on PHP 7.2.33(
   Mamp Pro) fwiw.
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13640446)
 * Great spot. I think that’s the fasted from release to first bug report that I’ve
   come across 😉
 * I’m running 7.4 myself and can’t recreate this myself but, you’re right, that
   comma shouldn’t be there. I’ll push out an update shortly to fix this.
 * Thank you.
 *  Thread Starter [JeanPaulH](https://wordpress.org/support/users/djr/)
 * (@djr)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13640454)
 * np. Great idea indeed. I’ll submit some issues on your Github repo (if not already
   open).
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13640463)
 * Thank you – that would be fantastic. I already have some ideas on there for the
   next big release, so the more you can add, the better.
 *  [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13642910)
 * In case you’re wondering, this is because trailing commas in function calls are
   allowed since PHP 7.3, which is why it works in 7.4 but fatals in 7.2. Info: 
   [https://laravel-news.com/php-trailing-commas-functions](https://laravel-news.com/php-trailing-commas-functions)
 * The PHPCompatibility library has saved me from this sort of thing a few times:
   [https://github.com/PHPCompatibility/PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility)
 *  Plugin Author [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13643054)
 * :TIL:
 * Thanks John – will dig into that further.
 * I can actually drop my PHP version back too, so I’ll make sure I do that when
   testing in future.

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

The topic ‘Unable to activate plugin: PHP error’ is closed to new replies.

 * ![](https://ps.w.org/draft-concluder/assets/icon.svg?rev=3025364)
 * [Draft Concluder](https://wordpress.org/plugins/draft-concluder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/draft-concluder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/draft-concluder/)
 * [Active Topics](https://wordpress.org/support/plugin/draft-concluder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/draft-concluder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/draft-concluder/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/unable-to-activate-plugin-php-error/#post-13643054)
 * Status: resolved