Bug #52738 [Opn->Csd]: Can't use new properties in class extended from DateInterval
| From: | stas@php.net | Date: | Mon, 24 Jan 2011 02:32:01 +0000 |
| Subject: | Bug #52738 [Opn->Csd]: Can't use new properties in class extended from DateInterval | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-158129@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52738&edit=1
ID: 52738
Updated by: stas@php.net
Reported by: camka at hot dot ee
Summary: Can't use new properties in class extended from
DateInterval
-Status: Open
+Status: Closed
Type: Bug
Package: Date/time related
Operating System: Ubuntu 10.04
PHP Version: 5.3.3
-Assigned To:
+Assigned To: stas
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2010-08-30 12:50:27] camka at hot dot ee
Description:
------------
When trying to set or get any pre-defined property other then
y/m/d/h/i/s in a class extended from built-in DateInterval, the error
tells you that the property is not known.
Also tried with
PHP 5.3.4-dev (cli) (built: Aug 30 2010 13:48:30)
Test script:
---------------
<?php
class di extends DateInterval {
public $unit = 1;
}
$I = new di('P10D');
echo $I->unit;
Expected result:
----------------
1
Actual result:
--------------
Fatal error: main(): Unknown property (unit) in /var/www/test/inter.php
on line 7
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52738&edit=1