Bug #64172 [Ver->Csd]: errorInfo is not properly cleaned up
| From: | stas@php.net | Date: | Mon, 19 Oct 2015 00:58:09 +0000 |
| Subject: | Bug #64172 [Ver->Csd]: errorInfo is not properly cleaned up | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196681@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64172&edit=1
ID: 64172
Updated by: stas@php.net
Reported by: dmitry dot vasilev at gmail dot com
Summary: errorInfo is not properly cleaned up
-Status: Verified
+Status: Closed
Type: Bug
Package: PDO Core
Operating System: Irrelevant
PHP Version: 5.4.11
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of daniel.persson@textalk.se
Revision: http://git.php.net/?p=php-src.git;a=commit;h=73384728cadfc28ae6c621636de25fdada464e5b
Log: Fix bug #64172
Previous Comments:
------------------------------------------------------------------------
[2014-06-04 09:01:47] mbeccati@php.net
I started writing a new common phpt file in order to check the behaviour of drivers other then pgsql
and it seems that pdo_sqlite and pdo_mysql are affected too, so I'm changing the bug type to
PDO Core.
------------------------------------------------------------------------
[2013-02-08 07:55:43] dmitry dot vasilev at gmail dot com
Description:
------------
Affects at least PgSQL driver (MySQL works fine).
Workflow:
1. Make invalid query - errorInfo()[2] contains error info. Error code is not
zero.
2. Make valid query - errorInfo()[2] still contains an error from the first step
(but error code is 0).
pdo_pgsql:
libpq version 9.0.8
Module version: 1.0.2
Test script:
---------------
$pdo->exec("SELECT * FROM bad_table;");
echo $pdo->errorInfo()[2]; // "relation bad_table doesn't exist"
$pdo->exec("SELECT * FROM good_table;");
echo $pdo->errorInfo()[2]; // "relation bad_table doesn't exist". Expected
"".
Expected result:
----------------
""
Actual result:
--------------
"relation bad_table doesn't exist"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64172&edit=1