Edit report at https://bugs.php.net/bug.php?id=64035&edit=1
ID: 64035 Updated by: m...@php.net Reported by: lionishy at gmail dot com Summary: In constructing \PDO an empty Fatal Error appears -Status: Open +Status: Feedback Type: Bug Package: PDO related Operating System: Windows 8 PHP Version: 5.4.11 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.4-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Cannot reproduce. Previous Comments: ------------------------------------------------------------------------ [2013-01-21 11:14:08] lionishy at gmail dot com Description: ------------ When I construct an object I expect an exception to be thrown when there's any problem. Still, on Windows 8 I get the Fatal Error with no message, while expecting Fatal Error: Uncaught Exception. Moreover, if \PDOException is caught and any other type exception is thrown, normal Fatal Error: Uncaught Exception <bla bla bla> appears. Test script: --------------- <?php /** * an empty Fatal Error appears */ $pdo = new \PDO('mysql:host=localhost;dbname=test','user','password'); /** * an expected Fatal Error Uncaught Exception apperas */ try { $pso = new \PDO('mysql:host=localhost;dbname=test','user','password'); } catch(\PDOException $ex) { throw new Exception('\PDO Exception\'s been caught!'); } /** * an empty Fatal Error appears again */ try { $pso = new \PDO('mysql:host=localhost;dbname=test','user','password'); } catch(\PDOException $ex) { throw new Exception($ex->getMessage()); } Expected result: ---------------- Fatal Error: Uncaught Exception '\PDOException' with message '<message goes here>' in test.php on line 5 Actual result: -------------- Fatal Error: in test.php on line 5 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=64035&edit=1