Title: Email Before Download plugin incompatible with PHP7
Last modified: January 16, 2017

---

# Email Before Download plugin incompatible with PHP7

 *  [lukescammell](https://wordpress.org/support/users/lukescammell/)
 * (@lukescammell)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/incompatible-with-php7/)
 * I originally posted this as a review, as I got lost in the new WordPress plugins
   theme… I think it’s better placed here.
 * [https://wordpress.org/support/topic/problems-with-php-7-2/](https://wordpress.org/support/topic/problems-with-php-7-2/)
 * Unfortunately this plugin seems to break with PHP7.
 *     ```
       FILE: /wp-content/plugins/email-before-download/download.php
       --------------------------------------------------------------------------------------------------
       FOUND 1 ERROR AFFECTING 1 LINE
       --------------------------------------------------------------------------------------------------
        253 | ERROR | preg_replace() - /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
       --------------------------------------------------------------------------------------------------
       ```
   
 * The line in question from download.php is:
 * `$match[1] = preg_replace('/(?<=^|[\x09\x20\x2D])./e', 'strtoupper("\0")', strtolower(
   trim($match[1])));`
 * Please could the plugin be updated ASAP for PHP7 compatibility by the author?
 * Failing that, if anyone else knows how to correct this for PHP7 with a simple
   patch, I’d love to hear about it!
 * Thanks!
    -  This topic was modified 9 years, 4 months ago by [lukescammell](https://wordpress.org/support/users/lukescammell/).
      Reason: Added plugin name to title

The topic ‘Email Before Download plugin incompatible with PHP7’ is closed to new
replies.

 * ![](https://ps.w.org/email-before-download/assets/icon-256x256.jpg?rev=1813522)
 * [Email Before Download](https://wordpress.org/plugins/email-before-download/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-before-download/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-before-download/)
 * [Active Topics](https://wordpress.org/support/plugin/email-before-download/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-before-download/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-before-download/reviews/)

## Tags

 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * 0 replies
 * 1 participant
 * Last reply from: [lukescammell](https://wordpress.org/support/users/lukescammell/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/incompatible-with-php7/)
 * Status: not resolved