Installation fails with unexpected T_FUNCTION
-
I just installed the Duplicator plugin as I want to clone a web site so I can use it for test purposes. Have created the install.php and .zip files and put them in place. But when I run the install.php program I get the following error message:
Parse error: syntax error, unexpected T_FUNCTION in /var/sites/t/test.sustainability-in-practice.org.uk/public_html/installer.php on line 1081
Here is the code in installer.php around line 1081:
// Let’s use anonymous function after PHP5.3.0 – is faster than create_function()
// create_function() is removed from PHP 7.2
if(DUPX_U::isVersion(‘5.3.0’)) {
// Use “try catch” to avoid PHP notice or error below PHP5.3.0
try {
$walk_function = function () use (&$str) {
$str = “$str
“;
};
}
catch (Exception $exc) {}
} else {
$walk_function = create_function(‘&$str’, ‘$str = “$str
“;’);
}Line 1081 is the line that starts $walk_function
I am running PHP v7.1.5
Can anyone tell me what to do to get around this?
- The topic ‘Installation fails with unexpected T_FUNCTION’ is closed to new replies.