#34756 [Asn->Csd]: PDOExceptions aren't derived from Exception which will cause a Fatal error

From: Date: Thu, 06 Oct 2005 14:00:41 +0000
Subject: #34756 [Asn->Csd]: PDOExceptions aren't derived from Exception which will cause a Fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-86130@lists.php.net to get a copy of this message
 ID:               34756
 User updated by:  spheroid@php.net
 Reported By:      spheroid@php.net
-Status:           Assigned
+Status:           Closed
 Bug Type:         PDO related
 Operating System: Mac OS X 10.4
 PHP Version:      5CVS-2005-10-06 (CVS)
 Assigned To:      helly
 New Comment:

My bad!

I should've compiled a more recent version before posting the report.
That one I was running was from yesterday - trying with most recent
snapshot it works like a charm.


Previous Comments:
------------------------------------------------------------------------

[2005-10-06 15:13:42] sniper@php.net

Marcus, if I understood correctly, you had something to do with this.
:)


------------------------------------------------------------------------

[2005-10-06 14:58:18] spheroid@php.net

Configure line goes here:

./configure --prefix=/usr/local --with-apxs2=/usr/local/bin/apxs
--disable-cgi --enable-mbstring --with-zlib --with-pdo-mysql
--with-pdo-pgsql=/opt/local/lib/pgsql8 --with-ldap --with-pgsql
--with-mysql --with-mssql=/opt/local --with-pdo-dblib=/opt/local
--without-pear

I tested this with RC1 and it works as expected but I get the error on
RC2-dev. I talked with Derick earlier today and he verified that he has
noticed the same behavior as well.

------------------------------------------------------------------------

[2005-10-06 14:17:43] tony2001@php.net

Can't reproduce.
What was your ./configure line ?

------------------------------------------------------------------------

[2005-10-06 13:59:09] spheroid@php.net

Description:
------------
The summary says it all. I upgraded to RC2-dev and noticed that if
something goes wrong and PDO::ERRMODE_EXCEPTION is set I get a Fatal
error.

Reproduce code:
---------------
<?php
$pdo = New PDO(...);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->query("SELECT FROM");
?>

Expected result:
----------------
Exception thrown as usual.

Actual result:
--------------
PHP Fatal error:  Exceptions must be valid objects derived from the
Exception base class in ...


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=34756&edit=1


Thread (6 messages)

« previous php.bugs (#86130) next »