Jump to content

Recommended Posts

Posted

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.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...