Jonathan Posted July 25, 2018 Report Posted July 25, 2018 I'm not sure when it stopped (version), but PDO (Record) isn't throwing exceptions when erroneous queries are thrown at it. I tracked this down to PDO::ERRMODE_EXCEPTION not being set on the actual queries. When I set this manually in the library all of the built in exceptions worked as expected again. I see code in the minphp PDO library that's supposed to set PDO::ERRMODE_EXCEPTION but it's not getting set for some reason, at least not on plugin-related things when using Record. To recreate, take a plugin, do something to a query via Record that will throw a MySQL error. The result is Blesta thinks things succeeded instead of throwing an error on the exception from the try/catch block since the exception was never thrown.
Tyson Posted July 27, 2018 Report Posted July 27, 2018 The PDO error mode is silent by default. I believe it threw exceptions pre-4.0 so we'll add that behavior back in CORE-2773. Michael 1
Blesta Addons Posted July 30, 2018 Report Posted July 30, 2018 On 7/27/2018 at 9:36 PM, Tyson said: The PDO error mode is silent by default. I believe it threw exceptions pre-4.0 so we'll add that behavior back in CORE-2773. are you remember this thread
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now