Bug #76462 [Opn->Ver]: Undefined property: DateInterval::$f
| From: | cmb@php.net | Date: | Tue, 12 Jun 2018 11:01:39 +0000 |
| Subject: | Bug #76462 [Opn->Ver]: Undefined property: DateInterval::$f | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215644@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: cmb@php.net
Reported by: ak at ivaris dot ch
Summary: Undefined property: DateInterval::$f
-Status: Open
+Status: Verified
Type: Bug
Package: Date/time related
PHP Version: 7.2.6
Block user comment: N
Private report: N
New Comment:
Seems to be regression introduced in PHP 7.1.11, see
<https://3v4l.org/q2n1G>.
Previous Comments:
------------------------------------------------------------------------
[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