Fatal error: Class 'Custom' contains 1 abstract method and must therefore be declared abstract or

Forum
Last Post
Threads / Messages

FounderSim

Member
Member
Joined
Sep 23, 2014
Messages
65
Points
0
Mysidian Dollar
4,975
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.
 
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:
PHP:
protected abstract function save($field, $value);

Try adding this to your class_customclass.php file:
PHP:
protected function save($field, $value) {}
 
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:
PHP:
protected abstract function save($field, $value);

Try adding this to your class_customclass.php file:
PHP:
protected function save($field, $value) {}

Good stuff. Works like a charm. I suppose I should have looked into the Model class. =}
 

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top