#35118 [Asn->Csd]: Using PDOStatement child class crashe Apache
| From: | iliaa@php.net | Date: | Mon, 07 Nov 2005 17:16:34 +0000 |
| Subject: | #35118 [Asn->Csd]: Using PDOStatement child class crashe Apache | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-87788@lists.php.net to get a copy of this message | ||
ID: 35118
Updated by: iliaa@php.net
Reported By: stochnagara at hotmail dot com
-Status: Assigned
+Status: Closed
Bug Type: PDO related
Operating System: windows xp
PHP Version: 5CVS-2005-11-05 (snap)
Assigned To: wez
New Comment:
This bug has been fixed in CVS.
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:
------------------------------------------------------------------------
[2005-11-07 15:31:55] sniper@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2005-11-05 20:34:27] stochnagara at hotmail dot com
Description:
------------
When I try to use a class which extends PDOStatement, my apache
crashes. Here is a simple reproduce script:
Reproduce code:
---------------
class MAppPDOStatement extends PDOStatement {
function __construct ($pdo) {
parent::__construct ($pdo);
$this->setFetchMode (PDO::FETCH_OBJ);
}
}
$a = new PDO("sqlite::memory:");
$a->exec ("create table test (id int not null unique, name string)");
$a->prepare ("select * from sqlite_master", array
(PDO::ATTR_STATEMENT_CLASS => 'MAppPDOStatement'));
Expected result:
----------------
no errors
Actual result:
--------------
Apache crashes.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35118&edit=1