Yii Framework Forum: after validation Yii throw directly PHP error - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

after validation Yii throw directly PHP error Rate Topic: -----

#1 User is offline   trankhanh89 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 13
  • Joined: 08-July 12

Posted 17 August 2012 - 11:22 PM

When trying to submit new Active record instance and save it to database table (by clicking the create button in action CREATE on screen), I got direct PHP error message. You could see 2 images below (you could ignore the logic, I just focus on why this PHP error was being displayed):
Posted Image
AND
Posted Image


I can't explain why this direct PHP ERROR is thrown. Because, my understanding is, after I click create button, Yii will validate all this AR class property. If this validation failed, I simply get a Validation error (either Ajax client or server validation checking) not direct PHP error message as it has happend here.
Could someone tell me what wrong in this situation?

Thank you!
0

#2 User is offline   Maurizio Domba 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,229
  • Joined: 12-October 09
  • Location:Croatia

Posted 18 August 2012 - 03:18 AM

In the second picture the first line has a call CModel->validate(null)... so the problem s somewhere there in the validation...
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   alirz23 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 504
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 18 August 2012 - 10:09 AM

you have problem in you validation rules double check it because if you look at the error mb_strlen expects a string array given which means you passing in an array in one of your validation rule
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users