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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | date-n2533080-4.patch | 8.26 KB | damienmckenna |
| #1 | date-clone-reserved-keyword-2533080.patch | 8.27 KB | jribeiro |
Comments
Comment #1
jribeiro commentedComment #2
badjava commentedConfirmed this fixes the issue and is the proper usage of clone as per:
http://php.net/manual/en/language.oop5.cloning.php
Comment #3
podarokLet's get testing bot for 5.6 then
https://www.drupal.org/pift-ci-job/132748
Comment #4
damienmckennaLets include this in the next release. Rerolled.
Comment #5
rajeev_drupal commentedComment #6
rajeev_drupal commentedTested 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
Comment #7
rajeev_drupal commentedTested 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
Comment #8
damienmckennaBumping to 2.11.
Comment #9
rajeev_drupal commentedComment #11
damienmckennaCommitted.
Comment #12
AritoMelo commentedThe patches work for version 2.10, however, for the oldest version like 2.9, it needs to do a little change, instead of using $argument->min_date use $argument->max_date as shown below.
Comment #13
damienmckenna@aritomelo: Hopefully you won't have to keep using 2.9 and we'll be able to fix any bugs that are preventing you from updating :)