Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-includes/pomo/plural-forms.php on line 210

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 77

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-content/plugins/jetpack/_inc/lib/class.media-summary.php on line 87
When ExpressionEngine calls your class to execute an action, it passes a constructor argument of 0
Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-includes/post-template.php on line 284

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-includes/post-template.php on line 284

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-includes/post-template.php on line 284

Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/45/d676125595/htdocs/spibey/public_html/blog/wp-includes/post-template.php on line 284

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