ID: 50559 Updated by: der...@php.net Reported By: sr at emini dot dk -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Fedora 10 PHP Version: 5.3.1 -Assigned To: +Assigned To: derick
Previous Comments: ------------------------------------------------------------------------ [2009-12-23 12:04:54] sr at emini dot dk Description: ------------ I am unable to clone an object of type DateInterval or DatePeriod. The clone appears to be an empty object. I've looked in the source and the code to clone the objects seem to be missing from both date_object_clone_interval() and date_object_clone_period(). Reproduce code: --------------- $dateInterval1 = new \DateInterval('P1D'); $dateInterval2 = clone $dateInterval; var_dump($dateInterval1); var_dump($dateInterval2); Expected result: ---------------- $dateInterval2 should be a clone of $dateInterval1. Actual result: -------------- $dateInterval1 works as expected, but $dateInterval2 appears to be an empty object. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50559&edit=1