[PHP 8.0] ArgumentCountError: Too few arguments to function MigrationBase::errorHandler(), 4 passed and exactly 5 expected in MigrationBase->errorHandler()

Created on 9 December 2021, over 2 years ago
Updated 29 January 2023, over 1 year ago

Problem/Motivation

When using this module with PHP 8.0, if the PHP error handler gets called, you'll get this error:

ArgumentCountError: Too few arguments to function MigrationBase::errorHandler(), 4 passed and exactly 5 expected in MigrationBase->errorHandler()

This is due to the $context argument being removed in PHP 8.0:

https://www.php.net/manual/en/function.set-error-handler#refsect1-functi...

Steps to reproduce

Use this module and get an error. :-)

Proposed resolution

I'll attach a patch in a moment that will work with both PHP 7 and 8.0

Remaining tasks

  1. Make patch
  2. Review
  3. Commit!

User interface changes

None

API changes

Adding a default to the 5th argument of MigrationBase::errorHandler()

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

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

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.

  • PHP 8.1

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

  • PHP 8.2

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

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