Hi,

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

Found this issue during an incompatibility scan to PHP 5.6

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

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

jribeiro’s picture

Status: Active » Needs review
FileSize
8.27 KB
PASSED: [[SimpleTest]]: [MySQL] 5,337 pass(es). View
badjava’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed this fixes the issue and is the proper usage of clone as per:

http://php.net/manual/en/language.oop5.cloning.php

podarok’s picture

Status: Reviewed & tested by the community » Needs review

Let's get testing bot for 5.6 then
https://www.drupal.org/pift-ci-job/132748

DamienMcKenna’s picture

rajeev_drupal’s picture

Assigned: Unassigned » rajeev_drupal
rajeev_drupal’s picture

Status: Needs review » Reviewed & tested by the community

Tested the patch manually and it's working fine.
Also it's pass in automated custom test: https://www.drupal.org/pift-ci-job/642296

As Clone is reserved keyword it's good to not use it as function.
http://php.net/manual/en/reserved.keywords.php

rajeev_drupal’s picture

Tested the patch manually and it's working fine.
Also it's pass in automated custom test: https://www.drupal.org/pift-ci-job/642296

As Clone is reserved keyword it's good to not use it as function.
http://php.net/manual/en/reserved.keywords.php

DamienMcKenna’s picture

rajeev_drupal’s picture

Assigned: rajeev_drupal » Unassigned