Since PHP version 5.0, clone is a reserved keyword and cannot be invoked as a function.

This issue was discovered with a PHP Compatibility scan to PHP 5.6.

http://php.net/manual/en/reserved.keywords.php
https://github.com/wimg/PHPCompatibility

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adamelleston created an issue. See original summary.

adamelleston’s picture

Status: Active » Needs review
FileSize
1 KB
rocketeerbkw’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/includes/sources.archivesource.inc
@@ -216,7 +216,7 @@ class backup_migrate_files_destination_archivesource extends backup_migrate_dest
-        $db_settings = clone($settings);
+        $db_settings = clone $settings;

This isn't technically incorrect, as it works like include or require but it can be misleading if you confuse it for a function invocation, so I'm for the change.

Patch still applies cleanly to 7.x-3.x-dev.

joelpittet’s picture

Priority: Normal » Minor

Also for this, but yes minor.

  • ronan committed df1a51b on 7.x-3.x authored by adamelleston
    Issue #2633304 by adamelleston: 'clone' is a reserved keyword introduced...
ronan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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