Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity CRUD API - main
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2010 at 22:22 UTC
Updated:
19 Dec 2010 at 17:54 UTC
I ran into this error on a fresh install of Drupal 7 HEAD today. Only comes up after I install Entity API and then install Rules, both version are the latest dev on November 30th.
Fatal error: Declaration of EntityAPIController::resetCache() must be compatible with that of DrupalEntityControllerInterface::resetCache() in d7\sites\all\modules\entity\entity\entity.controller.inc on line 119
I fixed it by changing entity.controller.inc line 326 to have "array" in it like entity.inc does.
OLD CODE:
public function resetCache($id = NULL) {
unset($this->defaultEntities);
if (isset($id)) {
unset($this->entityCache[$id]);
}
else {
$this->entityCache = array();
}
}
NEW CODE:
public function resetCache(array $id = NULL) {
unset($this->defaultEntities);
if (isset($id)) {
unset($this->entityCache[$id]);
}
else {
$this->entityCache = array();
}
}
I'll make a patch if I have some free time soon.
Comments
Comment #1
fagothat should be already fixed in the latest dev-snapshot?
see http://drupal.org/cvs?commit=457358
Comment #2
bendiy commentedI pulled the dev off the project page, not cvs, which I believe is a little delayed. It should be fine. I'll update it now.
Comment #4
miket3 commentedI just downloaded entities today and got the error. but the fix above worked.
Comment #5
miket3 commentedWell, as with drupal.. as well i dont know how to issue a problem. so i am curently on this thread so this thread gets the beating.
D7 leaves no failsafe way to recover from module errors. Simply deleting a module directory and removing the module entry from the system table yields fatal results.
i had know way to get to the uninstall screen. so that was not an option.
D6 knew how to handle missing modules gracefully.
Comment #6
miket3 commentednevermind. it fixed the immediate error but the modulke still doesnt work prorperly.