FilChi Weblog

$uses=null vs. $uses=array matters

Posted on: October 31, 2007


In daniel hoffster’s blog, he pointed out the difference of behavior when setting your $uses variable in your controllers to null against array().

If you try to do the same thing as daniel reported, you will encounter a PHP notice that says Notice: Undefined property: myController::$model . 

Advertisements
Tags: ,

1 Response to "$uses=null vs. $uses=array matters"

Very good find. Notices are often overlooked.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: