Deprecated function: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in MailMIME::toHeaders() (line 794 of D:\CMS\drupal-7.23\sites\all\modules\mailmime\mailmime.inc).

Same issue with the 7.x-2.18+0-dev version.

PHP 5.5.8 (cli) (built: Jan 8 2014 15:32:25)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

salvis’s picture

Version: 7.x-2.18 » 7.x-2.x-dev
Status: Active » Needs work

Patch against the -dev version, anyone?

cs_shadow’s picture

Status: Needs work » Needs review
FileSize
721 bytes

This patch uses preg_replace_callback() function instead of using \e modifier in preg_replace() function.

salvis’s picture

Status: Needs review » Needs work

Thank you for the patch and sorry to let this sit for so long -- I was hoping for some who actually uses Mail MIME to review and test...

The patch looks good. However, according to https://drupal.org/requirements, PHP 5.3 is only recommended — we have to run under 5.2.5, which does not have anonymous functions. We must use create_function() instead.

cs_shadow’s picture

Status: Needs work » Needs review
FileSize
705 bytes
493 bytes

This patch uses create_function() instead of anonymous function.

salvis’s picture

Status: Needs review » Fixed

Thank you for the analysis and patch!

cs_shadow’s picture

@salvis, doesn't this needs to be committed?

salvis’s picture

  • Commit a09cfd6 on 7.x-2.x by salvis:
    Issue #2198587 by cs_shadow | oligodosh: Fixed Deprecated function:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Anonymous’s picture

Is the commit not included? I downloaded today your module but this patch is missing.

my-family’s picture

+1, will it be commited? Thank you...

salvis’s picture

I don't understand — when I look at https://cgit.drupalcode.org/mailmime/tree/mailmime.inc?h=7.x-2.x&id=a09cfd6, then I see the code from #4 on lines 782.

It's in the -dev version...

Mike Lewis’s picture

I've rerolled #4 without the use of the deprecated create_function().