php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50703 Call parent::__construct in MySQL with call_user_func* segfault php
Submitted: 2010-01-08 23:19 UTC Modified: 2010-01-09 01:48 UTC
From: gmblar+php at gmail dot com Assigned:
Status: Closed Package: MySQLi related
PHP Version: 5.3.1 OS: *
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gmblar+php at gmail dot com
New email:
PHP Version: OS:

 

 [2010-01-08 23:19 UTC] gmblar+php at gmail dot com
Description:
------------
Call parent::__construct in MySQL with call_user_func* segfault php

Reproduce code:
---------------
<?php

class Database_MySQLi extends MySQLi {

    public function __construct() {
        $arguments = func_get_args();
        call_user_func_array(array('parent', '__construct'), $arguments);
    }

}

$database = new Database_MySQLi('localhost', 'username', 'password');

?>

Expected result:
----------------
No Segmentation fault

Actual result:
--------------
Segmentation fault

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-09 00:36 UTC] bjori@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This is an endless recursion to the Database_MySQLi constructor.
 [2010-01-09 01:48 UTC] bjori@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/.
 
Thank you for the report, and for helping us make PHP better.

This actually was a bug in 5.3.1, which is fixed in 5.3.3-dev.

Please try the latest 5.3 RC: http://qa.php.net/
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 08:01:34 2025 UTC