|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74852 DateInterval: property_exists returns true from unknown DateInterval property
Submitted: 2017-07-04 06:43 UTC Modified: 2017-07-06 11:20 UTC
From: pjunk at gmx dot de Assigned: jhdxr (profile)
Status: Closed Package: Date/time related
PHP Version: 7.0.14 OS: LINUX
Private report: No CVE-ID: None
 [2017-07-04 06:43 UTC] pjunk at gmx dot de
property_exists from any unknown DateInterval property have a incorrect result
and throw a notice.

Test script:
$interval = new DateInterval('P2D');

Expected result:

Actual result:
Notice:  Undefined property: DateInterval::$abcde in ... on line 3

//use get_class()
$interval = new DateInterval('P2D');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-04 07:12 UTC] pjunk at gmx dot de
-Package: *General Issues +Package: Date/time related
 [2017-07-04 07:12 UTC] pjunk at gmx dot de
Edit package
 [2017-07-04 11:17 UTC] anon at example dot com
Note: <> shows that this bug was introduced in PHP 7.0.14, probably by the same change that fixed bug #69587 (see <>).
 [2017-07-06 11:20 UTC]
-Status: Open +Status: Assigned -PHP Version: 7.1.6 +PHP Version: 7.0.14 -Assigned To: +Assigned To: jhdxr
 [2017-07-10 05:54 UTC]
Automatic comment on behalf of jhdxr
Log: Fixed bug #74852 (property_exists returns true on unknown DateInterval property)
 [2017-07-10 05:54 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC