Improper fetchCol() use in hook_requirements causes TypeError

Created on 1 September 2022, almost 2 years ago
Updated 18 September 2023, 9 months ago

After upgrading to PHP 8, the core Status Report page is broken with the message:

TypeError: PDOStatement::fetchAll(): Argument #2 must be of type int, string given in PDOStatement->fetchAll() (line 2299 of /app/docroot/includes/database/database.inc).

A backtrace determined the problem was in safe_cache_form_clear_requirements(), which passes a string to DatabaseStatementInterface::fetchCol() instead of an int.

πŸ› Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ChaseOnTheWeb USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024