• Resolved almendron

    (@almendron)


    Function create_function() is deprecated in PHP 7.2

    File duplicator/installer/build/classes/class.engine.php. Line 149:

    $walk_function = create_function('&$str', '$str = "$str";');

    File duplicator/views/tools/logging.php. Line 8:

    usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));

    File duplicator/views/tools/diagnostics/logging.php. Line 8:

    usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));

    Can you solve it in the next version?

    • This topic was modified 8 years, 3 months ago by almendron.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey @almendron,

    Thanks for the feedback! If you can give the developer version a try it will have the updates for this issue. The very latest version (1.2.33) can be found by following these instructions:

    Download Developer Version
    – Uninstall your current version and install this one.

    Let me know if this solves your issue and we’ll get it out in the next version.

    Thanks

    Thread Starter almendron

    (@almendron)

    1) File duplicator/installer/build/classes/class.engine.php: OK

    2) File duplicator/views/tools/logging.php. Line 8: Not solved

    usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
    @chmod(DUP_Util::safePath($logs[0]), 0644);

    Suggestion:

    usort($logs, function($a, $b) {
    	return filemtime($b) - filemtime($a);
    });
    @chmod(DUP_Util::safePath($logs[0]), 0644);

    3) File duplicator/views/tools/diagnostics/logging.php: OK

    My Bad… Actually
    duplicator/views/tools/logging.php is no longer used, it has now been removed.

    Thanks for looking at that! Should go out next release…

    Cheers~

    Thread Starter almendron

    (@almendron)

    Thank you again and my regards.

    Thanks for closing out!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deprecated: Function create_function()’ is closed to new replies.