Nov 10 2009

CakePHP class_registry.php Fatal Error

Published by Justin at 9:18 am under CakePHP

Your correspondent ran into this rather crippling fatal error while working on a CakePHP application:

Fatal error:  Class '' not found in path-to-cake\cake\libs\class_registry.php on line 140

Googling, clearing the CakePHP cache and several Apache restarts didn’t offer a solution. The problem turned out to be a stupid mistake in a model file that had a blank hasOne relationship setting:

var $hasOne = '';

Fixing the half-completed model relationship fixed the issue (either remove the line or enter in the name of a model for the relationship).

No responses yet

Trackback URI | Comments RSS

Leave a Reply