When ExpressionEngine calls your class to execute an action, it passes a constructor argument of 0

In /system/expressionengine/libraries/Actions.php, you will find this code around line 185

    // Instantiate the class/method		
    $ACT = new $class(0);

Not sure why this is done, but if your class takes a constructor argument (like mine does) you may find yourself scratching your head at why it won’t load when called from an action.

09
Nov 2011
POSTED BY
POSTED IN ExpressionEngine PHP
DISCUSSION 1 Comment
TAGS