Hi, on PHP 7.2 the function create_function() is deprecated. Currently is used on intlinks.module, function: intlinks_title_filter_process().

With the following minor fix it looks fine:

@@ -85,8 +85,9 @@ function intlinks_title_filter_process($text, $filter, $format, $langcode, $cach
   // preg_replace_callback does not support additional parameters.
   // Therefore we use an anonymous function as wrapper to add the language code
   // as dynamic parameter.
-  $intlinks_title_process_link = create_function('$matches',
-    'return _intlinks_title_process_link($matches, "' . $langcode . '");');
+  $intlinks_title_process_link = function($matches) use ($langcode) {
+    return _intlinks_title_process_link($matches, $langcode);
+  };
   return preg_replace_callback('%<a([^>]+?href="([^"]+?)"[^>]*?)>%i',
     $intlinks_title_process_link, $text);
 }

What do you think?

CommentFileSizeAuthor
create_function-deprecated-fix.patch933 bytesfinex

Issue fork intlinks-3035372

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

FiNeX created an issue. See original summary.

robertoperuzzo’s picture

Patch works.

  • robertoperuzzo committed d19fc7d on 7.x-2.x
    Issue #3035372 by robertoperuzzo: Function create_function() is...
cspitzlay’s picture

Status: Needs review » Fixed

Committed. Thanks for you work.

Status: Fixed » Closed (fixed)

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

subir_ghosh’s picture

This works. Thank you.