CodeIgniter Forums
Error redeclare class - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: Model-View-Controller (
+--- Thread: Error redeclare class (/showthread.php?tid=69048)

Error redeclare class - omid_student - 10-01-2017

I make library Message.php and auto load it in config/autoload.php
I use it in one of models
But it get error below when i use it
( ! ) Fatal error: Cannot redeclare SendEmailMessage() (previously declared in C:\wamp64\www\\Alis_WebService\application\libraries\Message.php:56) in C:\wamp64\www\\Alis_WebService\application\libraries\Message.php on line 56

I cannot find where is redeclare class?

RE: Error redeclare class - ciadmin - 10-01-2017

You need to share some code, eg your Message.php, so we can see what it extends. On the surface, you are trying to over-ride an existing method in your superclass.

RE: Error redeclare class - omid_student - 10-01-2017

It Solved
I forgot insert "}" in end of class :||||