PHP Fatal Error with static method isDuplicate

Created on 28 November 2023, 7 months ago
Updated 6 March 2024, 4 months ago

When installing the module, I run into the error

PHP Fatal error:  Cannot make non static method Drupal\Core\Entity\EntityBase::isDuplicate() static in class Drupal\crop_image\Entity\CropDuplicate in /var/www/html/docroot/modules/contrib/crop_image/src/Entity/CropDuplicate.php on line 227

removing static is not enough, since isDuplicate in CropDuplicate.php has the file id (fid) as parameter, so I had to re-name the isDuplicate function to isDuplicateFile, to avoid conflicting with existing Drupal\Core\Entity\EntityBase::isDuplicate()

🐛 Bug report
Status

Closed: cannot reproduce

Version

2.0

Component

Code

Created by

🇺🇸United States alimc29

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024