PHP's create_function() has been deprecated as of PHP 7.2. This function is used to create an anonymous function. PHP 5.3 has an alternative to doing this, but this too should be avoided because Drupal 7 officially supports PHP 5.2.5+.

To make this module compatible with future versions of PHP 7, its usage should be replaced with the remaining alternative, which is using a real function definition instead of an anonymous function.

Comments

bkosborne created an issue. See original summary.

vlklavanya’s picture

StatusFileSize
new835 bytes

Hi,

Please review the uploaded patch.

vlklavanya’s picture

Status: Active » Needs review
oadaeh’s picture

StatusFileSize
new1.66 KB

@vlklavanya your patch needs php = 5.3 added to the .info module to be complete.

However, attached is a patch that accomplishes the task in a way that does not need to change the module's requirements.

loopduplicate’s picture

StatusFileSize
new1.65 KB
loopduplicate’s picture

Status: Needs review » Reviewed & tested by the community

Looks great :) I like the old way better anyway :)

sjerdo’s picture

Patch #4 LGTM +1

  • jerdavis committed fb0b6ce on 7.x-1.x
    Issue #2947006 by vlklavanya, oadaeh, loopduplicate, bkosborne, sjerdo:...
jerdavis’s picture

Status: Reviewed & tested by the community » Fixed

Looks good. Thanks!

Status: Fixed » Closed (fixed)

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

fadonascimento’s picture

StatusFileSize
new1.66 KB

I'm upload a new patch to change "strtolower" to "drupal_strtolower", to avoid unicode bugs.