Gives deprecation warning (Function create_function() is deprecated) with PHP 7.2 (which throws an Exception in Laravel)

Issue #1 new
Steve Hartley created an issue

Fix is easy, it seems...

in preg_helper.php's preg_merge(), change:

                create_function(
                    '$m',
                    'return $m[1] . "\\\\" . ((int)$m[2] + ' . $capture_count . ');'
                ),

to:

                function ($m) use ($capture_count) {
                    return $m[1] . "\\\\" . ((int)$m[2] + $capture_count);
                },

Comments (2)

  1. Log in to comment