You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As shown in a community forum discussion, there is a potential for a PDOException to return a code value that is alphanumeric, but PHP strict typing declares the code parameter to be of type INT. Ironically, the PHP documentation for Exception::getCode, which declares the parameter to be of type INT, even states that PDOException may return a string value. 🤦
If extending from these exceptions, to prevent errors, some typecasting will likely be necessary on the code property.
The text was updated successfully, but these errors were encountered:
Thanks @BrendonKoz I've pushed an update to hopefully fix this, but as I don't know what sequence of events triggered that error, I am not able to duplicate the same scenario so just need confirmation that this fixes the issue.
As shown in a community forum discussion, there is a potential for a PDOException to return a code value that is alphanumeric, but PHP strict typing declares the code parameter to be of type INT. Ironically, the PHP documentation for Exception::getCode, which declares the parameter to be of type INT, even states that PDOException may return a string value. 🤦
If extending from these exceptions, to prevent errors, some typecasting will likely be necessary on the
code
property.The text was updated successfully, but these errors were encountered: