php - Yii 1.1.13 dies with error 500 after using addError -


i'm working on tool uses yii version 1.1.13 , after addig new error messages adderrormethod, despite worked fine on page used it, threw strange, long error message on index page error 500.

missing argument 1 cmodel::geterror(), called in /var/www/html/framework/base/ccomponent.php on line 111 , defined (/var/www/html/framework/base/cmodel.php:371) stack trace: #0 /var/www/html/protected/models/testcases.php(132): testcases->__get() #1 /var/www/html/protected/views/site/index.php(189): testcases->search() #2 /var/www/html/framework/web/cbasecontroller.php(126): require() #3 /var/www/html/framework/web/cbasecontroller.php(95): sitecontroller->renderinternal() #4 /var/www/html/framework/web/ccontroller.php(869): sitecontroller->renderfile() #5 /var/www/html/framework/web/ccontroller.php(782): sitecontroller->renderpartial() #6 /var/www/html/protected/controllers/sitecontroller.php(295): sitecontroller->render() #7 /var/www/html/framework/web/actions/cinlineaction.php(49): sitecontroller->actionindex() #8 /var/www/html/framework/web/ccontroller.php(308): cinlineaction->runwithparams() #9 /var/www/html/framework/web/ccontroller.php(286): sitecontroller->runaction() #10 /var/www/html/framework/web/ccontroller.php(265): sitecontroller->runactionwithfilters() #11 /var/www/html/framework/web/cwebapplication.php(282): sitecontroller->run() #12 /var/www/html/framework/web/cwebapplication.php(141): cwebapplication->runcontroller() #13 /var/www/html/framework/base/capplication.php(184): cwebapplication->processrequest() #14 /var/www/html/index.php(13): cwebapplication->run() request_uri=/index.php in /var/www/html/protected/models/testcases.php (132) in /var/www/html/protected/views/site/index.php (189) in /var/www/html/protected/controllers/sitecontroller.php (295) 

this bug appeared after generating test cases new error message. reverted modified file svn repository previous version worked fine, still can't rid of message.

i added new errors this:

if (fieldsqueue::model()->exists("fieldname = 'something'"))                 $model->adderror('error', "something happened");             else if (!isset($_post['something']))                  $model->adderror('test',"this new error);             else { } 

thanks in advance helping answers. :)

hii definition of adderror is

public void adderror(string $attribute, string $error) 

$attribute should model (db) attribute

in code

$model->adderror('error', "something happened"); 

error should model attribute


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -