ZF-8589: PDOException::getcode() returns string but Exception expects int

Issue Type: Bug Created: 2009-12-20T12:41:56.000+0000 Last Updated: 2009-12-21T06:54:13.000+0000 Status: Resolved Fix version(s): - 1.10.0 (27/Jan/10)

Reporter: Benjamin Eberlei (beberlei) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:


In Zend_Db_Statement_Pdo line 234 the PDOException is catched and re-returned as Zend_Db_Statement_Exception.

In the process of this getCode() from PDOException is passed into the new exception. However its expecting an int, not a string, and fatal's on this issue.

Reproduce case:

<pre class="highlight">
$db->query("SELECT * FROM foo WHERE bar = ?");

This is on PHP 5.3.1


Posted by Matthew Weier O'Phinney (matthew) on 2009-12-21T06:54:13.000+0000

Resolved in trunk.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.