php - Yii: Trying to get property of non-object -


I have come in many positions to try to get the 'non-object property', but I still have the figure Unable to do, I have a webapp out of my problem and when I make a form it is giving me this error -

view.php:

  $ This-> breadcrumbs = array ('event' = & gt; array ('index'), $ model-> anonymous, // error on this line);   

Controller:

  Public function Action View ($ ID) {$ this- & gt; Assign ('view', array ('model' => = this- & gt; LoadModel ($ ID),)); } Public function LoadModel ($ id) {$ ename = Event :: model () - & gt; Ename; $ Model = event :: model () - & gt; findByPk ($ id, $ ename); // It tries because if I have the overall key ($ model === faucet) throw new CHttpException (404, 'Requested page does not exist.'); Return model $; }    

I'm not a Yii expert, but in general it means that $ Models are not an object In most structures you will use $ $ instead of $ model - this model, can this be the case? Try it then $ this-> Model- & gt; ename ?

It seems that this is the matter.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -