php-activerecord
php-activerecord copied to clipboard
Adding handling of PDOException
Adding threatment of PDOException as well to DatabaseException. closes #337
:+1:
The previous behavior is a security risk, since directly passing the PDOException to Exception::__construct() causes the __toString() to be implicitly called. The Exception->__toString() method includes the full stack trace, which will include the database credentials in the call to new PDO() in Connection->__construct(). If you use a service like Airbake to collect exceptions, that means you'll be transmitting database credentials to a third party.