ID: 35336
Updated by: [EMAIL PROTECTED]
Reported By: stochnagara at hotmail dot com
-Status: Open
+Status: Verified
Bug Type: PDO related
Operating System: windows xp
PHP Version: 5CVS-2005-11-22 (snap)
Previous Comments:
------------------------------------------------------------------------
[2005-11-22 18:15:22] stochnagara at hotmail dot com
Description:
------------
I use PDO::FETCH_CLASS mode for fetching DB data with PDO. But when I
implement __set method in my data class, Apache crashes.
Reproduce code:
---------------
<?
class EEE {
function __set ($field, $value) {
echo 'hello world';
}
}
$a = new PDO("sqlite::memory:");// pool ("sqlite::memory:");
$a->query ("CREATE TABLE test (a integer primary key, b text)");
$b = $a->prepare("insert into test (b) values (?)");
$b->execute(array (5));
$rez = $a->query ("SELECT * FROM test")->fetchAll(PDO::FETCH_CLASS,
'EEE');
Expected result:
----------------
$rez contains 1 object of class EEE
Actual result:
--------------
Apache crashes.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35336&edit=1