SuiteCRM
SuiteCRM copied to clipboard
Fix #9728 - cron.php fails with "must be compatible" error
… from AOPInboundEmail.php
Description
Trying to run cron.php with PHP 8 fails with a fatal error (see issue salesagility/SuiteCRM-Core#143):
PHP Fatal error: Declaration of AOPInboundEmail::handleCreateCase(Email $email, $userId) must be compatible with InboundEmail::handleCreateCase($email, $userId)
Motivation and Context
This allows cron.php to succeed on a system with PHP 8.
The fix was suggested by pgr on forum team: "it’s a known issue that was aggravated in PHP 8 because it used to be a warning, now it’s FATAL"
How To Test This
Run cron.php with PHP 8
(Note: for the script to fully succeed, PR salesagility/SuiteCRM#9731 for Issue salesagility/SuiteCRM#9730 must also be applied)
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Final checklist
- [x] My code follows the code style of this project found here.
- [ ] My change requires a change to the documentation.
- [x] I have read the How to Contribute guidelines.
This pull request has been mentioned on SuiteCRM. There might be relevant details there:
https://community.suitecrm.com/t/patches-needed-for-cron-script/85841/3
This pull request has been mentioned on SuiteCRM. There might be relevant details there:
https://community.suitecrm.com/t/declaration-of-aopinboundemail-error/87050/2