php - Yii Property "User.hasErrors" is not defined -
i want check if has error model this
$mo=new user(); if($mo->haserrors){ echo "error"; }
but error property "user.haserrors" not defined occurs. can help?
cmodel has no property named haserrors
. method, not property. replace haserrors()
below:
if($mo->haserrors()){ //error }
php yii model
No comments:
Post a Comment