• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XFCP_ : What does it mean and how do I find redeclare error?

LPH

Well-known member
#1
First, I'm working with an add-on that tosses a cannot redeclare XFCP_ when the add-on is enabled. Since there is no XFCP directory, I'm trying to figure out what this even means. I see it in numerous add-ons to extend a class.

Second, since the error is a redeclaration, I've searched all of the other add-ons for a similar set of code but don't see any. What other ideas can help me track down why there is a redeclaration error?
 

Chris D

XenForo developer
Staff member
#4
Another pretty easy mistake to make is doing something like this in a load class controller listener:

PHP:
$extend[] = 'The_Extending_Class';
Without using an event hint (recommended) or wrapping it in a conditional to restrict it to a single class.
 

LPH

Well-known member
#5
Another pretty easy mistake to make is doing something like this in a load class controller listener:

PHP:
$extend[] = 'The_Extending_Class';
Without using an event hint (recommended) or wrapping it in a conditional to restrict it to a single class.
This is probably it. The $extend is not wrapped in the listener.