-
Bug
-
Resolution: Fixed
-
Major
-
None
-
3.3.19
-
None
-
PHP 8+
MySQL 5.7
In some cases, updating the database to phpBB 3.3.19 fails due to installer timeout, with this PHP fatal error in webserver's error log:
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, false given in /phpbb/db/migration/data/v33x/ai_crawler_bots.php:117 |
The problem is an extension which adds new columns to phpBB groups table, but those columns don't have default values. So add_ai_crawlers_group migration silently failed to create the group (due to SQL error under the hood), because $this->sql_query($sql); suppresses SQL errors output.
Changing it to $this->db->sql_query($sql); allowed to narrow the issue down.
The SQL error is: General error:SQL ERROR [ mysqli ]Field 'group_userpm_message' doesn't have a default value.
As the above add_ai_crawlers_group fails, ai_crawler_bots, which depends on it, can't get AI group data properly (relevant SQL query result returns false), hence PHP fatal error, because it applies count() to false.

