yii - Trying to get property of non-object with PHP -


i have strange issue; code working on localhost, when try use online. it's showing error in return line:

trying property of non-object

here code:

public static function displaycontenuasstring ($id,$class="traduction survol_video",$div="div") {         return "<$div id=\"contenu_$id\" class=\"$class\"></$div>".contenu::model()->findbypk($id)->valeur;          } 

no issues in code contenu::model()->findbypk($id)->valeur; check row in database primary key.


Comments