Bug #76462 [Ver->Csd]: Undefined property: DateInterval::$f

From: Date: Tue, 12 Jun 2018 13:33:07 +0000
Subject: Bug #76462 [Ver->Csd]: Undefined property: DateInterval::$f
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215654@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76462&edit=1 ID: 76462 Updated by: ab@php.net Reported by: ak at ivaris dot ch Summary: Undefined property: DateInterval::$f -Status: Verified +Status: Closed Type: Bug Package: Date/time related PHP Version: 7.2.6 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of ab Revision: http://git.php.net/?p=php-src.git;a=commit;h=72128294352e8b8dbbfe43f85cb5bf79a24a9332 Log: Fixed bug #76462 Undefined property: DateInterval::$f Previous Comments: ------------------------------------------------------------------------ [2018-06-12 11:01:38] cmb@php.net Seems to be regression introduced in PHP 7.1.11, see <https://3v4l.org/q2n1G>. ------------------------------------------------------------------------ [2018-06-12 08:43:12] ak at ivaris dot ch Description: ------------ The combined assignment operators do not work for DateTime::$f Test script: --------------- <?php $buggy = new DateInterval('P0Y'); $buggy->f += 0.01; $ok = new DateInterval('P0Y'); $ok->f = $ok->f + 0.01; var_dump($buggy->f); var_dump($ok->f); Expected result: ---------------- /tmp/mutime.php:9: double(0.01) /tmp/mutime.php:10: double(0.01) Actual result: -------------- PHP Notice: Undefined property: DateInterval::$f in /tmp/mutime.php on line 4 PHP Stack trace: PHP 1. {main}() /tmp/mutime.php:0 /tmp/mutime.php:9: double(0) /tmp/mutime.php:10: double(0.01) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76462&edit=1

« previous php.bugs (#215654) next »