Annotation of embedaddon/php/ext/pdo_sqlite/tests/bug35336.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #35336 (crash on PDO::FETCH_CLASS + __set())
                      3: --SKIPIF--
                      4: <?php # vim:ft=php
                      5: if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: class EEE {
                     10:        function __set ($field, $value) {
                     11:                echo "hello world\n";
                     12:        }
                     13: }
                     14: 
                     15: $a = new PDO("sqlite::memory:");// pool ("sqlite::memory:");
                     16: $a->query ("CREATE TABLE test (a integer primary key, b text)");
                     17: $b = $a->prepare("insert into test (b) values (?)");
                     18: $b->execute(array (5));
                     19: $rez = $a->query ("SELECT * FROM test")->fetchAll(PDO::FETCH_CLASS, 'EEE');
                     20: 
                     21: echo "Done\n";
                     22: ?>
                     23: --EXPECTF--    
                     24: hello world
                     25: hello world
                     26: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>