From: stochnagara at hotmail dot com
Operating system: windows xp
PHP version: 5CVS-2005-11-22 (snap)
PHP Bug Type: PDO related
Bug description: Apache crashe on FETCH_CLASS + __set
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 bug report at http://bugs.php.net/?id=35336&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35336&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35336&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35336&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35336&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35336&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35336&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35336&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35336&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35336&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35336&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35336&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35336&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35336&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35336&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35336&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35336&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35336&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35336&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35336&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35336&r=mysqlcfg