php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62508 Segfault while access a non-string property of DateInterval object
Submitted: 2012-07-08 16:22 UTC Modified: 2012-07-08 16:28 UTC
From: laruence@php.net Assigned: laruence (profile)
Status: Closed Package: Date/time related
PHP Version: 5.4.4 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: laruence@php.net
New email:
PHP Version: OS:

 

 [2012-07-08 16:22 UTC] laruence@php.net
Description:
------------
Segfault while access a non-string property of DateInterval object

Test script:
---------------
<?php
class Crasher extends DateInterval {
    public function __construct($time_spec) {
        parent::__construct($time_spec);
        var_dump($this->{2});
    }   
}   
$c = new Crasher("P2Y4DT6H8M");

Expected result:
----------------
NULL

Actual result:
--------------
core dump

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-08 16:28 UTC] laruence@php.net
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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-07-08 16:28 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Feb 01 07:05:52 2023 UTC