- Issue created by @jedihe
On PHP 8, the shipped Phamlp has a fatal error due to create_function() not being defined.
Run Sasson 2.x on PHP 8.
Add this polyfill in a .module file:
if (!function_exists('create_function')) {
// Polyfill to get Phamlp running in PHP 8.0+
// Code taken from https://github.com/php5friends/polyfill-create_function/blob/master/create_function.php
function create_function($args, $code)
{
static $i;
$namespace = 'SOME-UNIQUE-VALUE';
do {
$i++;
$name = "__{$namespace}_lambda_{$i}";
} while (\function_exists($name));
eval("function {$name}({$args}) { {$code} }");
return $name;
}
}
Active
2.10
Miscellaneous