[prev in list] [next in list] [prev in thread] [next in thread]
List: php-internals
Subject: Re: [PHP-DEV] Passing error codes through to PDOException
From: Joey Smith <joey () joeysmith ! com>
Date: 2010-01-12 3:59:46
Message-ID: 20100112035946.GB3815 () joeysmith ! com
[Download RAW message or body]
I also just attached the following to the bug - it's a test that checks this fix in
the sqlite driver - I can write tests for all the others if need be, but I figured
there are others who might already be more familiar with the individual PDO drivers
that would write them more quickly than I.
["bug50728.phpt" (text/plain)]
--TEST--
Bug #50728 (All PDOExceptions hardcode 'code' property to 0) (crash on PDO::FETCH_CLASS + __set())
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php
try {
$a = new PDO("sqlite:/this/path/should/not/exist.db");
} catch (PDOException $e) {
var_dump($e->getCode());
}
?>
--EXPECTF--
int(14)
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic