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
- Make patch
- Review
- Commit!
User interface changes
None
API changes
Adding a default to the 5th argument of MigrationBase::errorHandler()
Data model changes
None
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | migrate-php80-3253653-2.patch | 624 bytes | dsnopek |
Comments
Comment #2
dsnopekHere's the patch!
Comment #3
loopy1492 commentedThanks so much @dsnopek. That patch got my build running succesfully.
Comment #4
dsnopekComment #5
damienmckennaComment #6
joelpittetSeems reasonable, assuming something extending the base hasn't passed through the number of arguments is in this module or that last parameter was a new addition in either case this will help
Comment #7
joseph.olstadComment #9
pifagor commentedComment #10
joseph.olstadhttps://www.drupal.org/project/migrate/releases/7.x-2.12