我正在处理一个旧版应用程序,在添加新用户时遇到错误。更新用户时一切正常。
错误为:
[error] [exception.CException] exception 'CException' with message 'Property "User. password" is not defined.' in D:\xampp\htdocs\yii-1.1.16\framework\base\CComponent.php:130
Stack trace:
# 0 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(145): CComponent->__get(' password')
# 1 D:\xampp\htdocs\yii-1.1.16\framework\validators\CRequiredValidator.php(58): CActiveRecord->__get(' password')
# 2 D:\xampp\htdocs\yii-1.1.16\framework\validators\CValidator.php(201): CRequiredValidator->validateAttribute(Object(User), ' password')
# 3 D:\xampp\htdocs\yii-1.1.16\framework\base\CModel.php(159): CValidator->validate(Object(User), NULL)
# 4 D:\xampp\htdocs\yii-1.1.16\framework\db\ar\CActiveRecord.php(808): CModel->validate(NULL)
# 5 D:\xampp\htdocs\rz\protected\modules\admin\controllers\UserController.php(364): CActiveRecord->save()
# 6 D:\xampp\htdocs\yii-1.1.16\framework\web\actions\CInlineAction.php(49): UserController->actionCreate()
# 7 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(308): CInlineAction->runWithParams(Array)
# 8 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(133): CController->runAction(Object(CInlineAction))
# 9 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilter.php(40): CFilterChain->run()
# 10 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(1145): CFilter->filter(Object(CFilterChain))
# 11 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CInlineFilter.php(58): CController->filterAccessControl(Object(CFilterChain))
# 12 D:\xampp\htdocs\yii-1.1.16\framework\web\filters\CFilterChain.php(130): CInlineFilter->filter(Object(CFilterChain))
# 13 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(291): CFilterChain->run()
# 14 D:\xampp\htdocs\yii-1.1.16\framework\web\CController.php(265): CController->runActionWithFilters(Object(CInlineAction), Array)
# 15 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(282): CController->run('create')
# 16 D:\xampp\htdocs\yii-1.1.16\framework\web\CWebApplication.php(141): CWebApplication->runController('admin/user/crea...')
# 17 D:\xampp\htdocs\yii-1.1.16\framework\base\CApplication.php(184): CWebApplication->processRequest()
# 18 D:\xampp\htdocs\rz\index.php(24): CApplication->run()
# 19 {main}
REQUEST_URI=/rz/admin/user/create/?lang=en
1条答案
按热度按时间xu3bshqb1#
当我把Yii从1.1.16升级到1.1.17时,这个问题就解决了
此致