As of PHP 8.1.0, the default setting is MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT.
Previously, it was MYSQLI_REPORT_OFF.
Without this commit every failed query will throw a mysqli_sql_exception and this will break legacy code which is expecting false as return value from certain functions.
With this change it's still possible to override the reporting mode after including this wrapper. 🤓
Quote from the manual:
Without this commit every failed query will throw a mysqli_sql_exception and this will break legacy code which is expecting
false
as return value from certain functions.With this change it's still possible to override the reporting mode after including this wrapper. 🤓