View Full Version : Fatal error: Class 'Custom' contains 1 abstract method and must therefore be declared abstract or
FounderSim
02-16-2016, 10:18 PM
Fatal error: Class 'CustomClass" contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Model::save) in path/catisserie/classes/class_customclass.php on line 80
confused.
Line 80 is last line of file. This happens when I initiate the class
$boom = new CustomClass();
I got no paramaters in my constructor. it's more of a helper.
pachoofoosh
02-17-2016, 10:56 AM
Mysidia's Model class is abstract, so any classes that inherit it need to define its methods. The error is saying you do not have a save() method in customclass.php.
The class_model.php's save method:
protected abstract function save($field, $value);
Try adding this to your class_customclass.php file:
protected function save($field, $value) {}
FounderSim
02-17-2016, 08:28 PM
Mysidia's Model class is abstract, so any classes that inherit it need to define its methods. The error is saying you do not have a save() method in customclass.php.
The class_model.php's save method:
protected abstract function save($field, $value);
Try adding this to your class_customclass.php file:
protected function save($field, $value) {}
Good stuff. Works like a charm. I suppose I should have looked into the Model class. =}
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.