PHP 8 Compatibility: PDOStatement::fetchAll(): Argument #2 must be of type int, string given

Created on 3 February 2023, almost 2 years ago
Updated 12 February 2023, almost 2 years ago

Problem/Motivation

PHP 8 Compatibility: PDOStatement::fetchAll(): Argument #2 must be of type int, string given in PDOStatement::fetchAll() (line 2299 of /websites/content/master/includes/database/database.inc)

Error appears to be caused by the following lines. fetchCol() calls fetchAll() and requires the variable to be int. Disabling the module eliminates the error.

./contrib/workbench_scheduler/includes/workbench_scheduler_handler_filter_active.inc:17: $relevant_vids = $query->execute()->fetchCol('vid');
./contrib/workbench_scheduler/includes/workbench_scheduler_handler_filter_active.inc:25: $published_vids = $query->execute()->fetchCol('vid');
./contrib/workbench_scheduler/workbench_scheduler.module:1107: $sids = $schedules_query->execute()->fetchCol('sid');

Steps to reproduce

Use module with PHP 8.0, attempt to add, edit, delete configuration or content utilizing a configuration setting.

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States naidim

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024