Support » Plugin: Email Before Download » Email Before Download plugin incompatible with PHP7

  • lukescammell

    (@lukescammell)


    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/

    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 3 years ago by lukescammell. Reason: Added plugin name to title
  • The topic ‘Email Before Download plugin incompatible with PHP7’ is closed to new replies.