Tag Archives: cannot

Fatal Error Cannot Redeclare Function I

Sooner or later, you’re likely to see an error like this one:           [code language=”html”] Fatal error: Cannot redeclare functionname() (previously declared in path/somefile.php:49) in path/somefile.php …

Tags: , , , , | Posted under Uncategorized | Leave a comment

Fatal Error Cannot Redeclare Class

In the previous article, we used code like this to prevent collisions between function names: [code language=”php”] include MODX_CORE_PATH . ‘components/mycomponent/model/mymathfunctions.class.php’; $math = new MyMathFunctions(); echo $math->addIntegers(2,3); /* Displays 5 …

Tags: , , , | Posted under MODX, MODX | Leave a comment

Fatal Error Cannot Redeclare Function II

In the previous article, we saw how to prevent an error like this one by wrapping the function in an if (! function_exists() statement. [code language=”html”] Fatal error: Cannot redeclare …

Tags: , , , , | Posted under MODX, MODX | Leave a comment