|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-10 10:06 UTC] [email protected]
-Status: Open
+Status: Bogus
[2011-05-10 10:06 UTC] [email protected]
[2011-05-10 14:37 UTC] david at grudl dot com
[2011-05-12 16:31 UTC] [email protected]
-Status: Bogus
+Status: Re-Opened
[2011-05-12 16:31 UTC] [email protected]
[2011-05-16 17:37 UTC] [email protected]
[2011-05-16 17:38 UTC] [email protected]
-Status: Re-Opened
+Status: Closed
-Assigned To:
+Assigned To: johannes
[2011-05-16 17:38 UTC] [email protected]
[2012-04-18 09:50 UTC] [email protected]
[2012-07-24 23:41 UTC] [email protected]
[2013-11-17 09:38 UTC] [email protected]
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 11:00:02 2025 UTC |
Description: ------------ Iteration using foreach throws "previous" and irrelevant exception. Exception is throwed after last iteration. Test script: --------------- $conn = new PDO("mysql:dbname=test"); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $res = $conn->query('SELECT * FROM categories'); try { $conn->query('ERROR'); } catch (PDOException $e) { // exception is catched } foreach ($res as $k => $v); // now is throwed exception $e !!! Expected result: ---------------- do nothing