PHP 8.1: MySQLi: Default error mode set to exceptions https://php.watch/versions/8.1/mysqli-error-mode In PHP 8.1, the default error handling behavior of the MySQLi extension has changed from silencing errors to throw an Exception on errors. Prior to PHP 8.1, the default error reporting mode in MySQLi was to silent the errors, and often lead to code that did not follow proper Exception/Error handling. From PHP 8.1 and later, the default error reporting mode is to throw an Exception on errors. If you want to make php8.1 behave like php