|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-22 22:27 UTC] tony2001@php.net
[2005-11-23 13:52 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 07:00:01 2025 UTC |
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.