PHP error:Declaration of Espo\\Custxxx::loadAdditionalFields... must be compatible

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JayBee4pl
    Member
    • Oct 2019
    • 62

    PHP error:Declaration of Espo\\Custxxx::loadAdditionalFields... must be compatible

    I recovered 8.4.2 and the system was running.
    Then i made an Update to 9.0.1. Now i get this error
    This module CNApproval from the log message is a new module creted by me and it is not runnung.

    Our modified Case module is also not running.

    Hi,
    we had a issue and now i have an actual database and files from a Backup which ist 3 month old.

    After restore i upgraded manually to espo 9.0.1

    Now i get an error going to extensions or opening our custom Module.
    Any idea how to fix the difference between DB and files?
    I am also trying to compare the fields in database with the fileds showing in the entity Manager.

    Thanks in Advance.


    Full Error:
    [fcgid:warn] [pid 340050:tid 140455684441664] [client 62.2.101.82:0] mod_fcgid: stderr: PHP Fatal error: Declaration of Espo\\Custom\\Services\\xxx::loadAdditionalFields( Espo\\ORM\\Entity $entity) must be compatible with Espo\\Core\\Record\\Service::loadAdditionalFields( Espo\\ORM\\Entity $entity): void in /var/www/vhosts/XXXX/custom/Espo/Custom/Services/CNApproval.php on line 41, referer: https://espo.XXXXXX.com/
    Last edited by JayBee4pl; Today, 03:53 PM.
  • lazovic
    Super Moderator
    • Jan 2022
    • 823

    #2
    Hi JayBee4pl,

    Please tell me, did you make changes manually to the code of this custom entity in the custom directory?

    Comment

    • yuri
      Member
      • Mar 2014
      • 8574

      #3
      The PHP log message literally tells what needs to be fixes.

      Add ": void" to the end of the method. Though I recommend to reach out to the developer who wrote the customizations.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...