From 05e4112842a4ccfc505d97adaa0b86522997cf6f Mon Sep 17 00:00:00 2001 From: "alexander.makarow" Date: Thu, 12 May 2011 23:57:08 +0000 Subject: [PATCH] (Fixes issue 2341) More verbose log message for CModel::onUnsafeAttribute. Added model class --- CHANGELOG | 1 + framework/base/CModel.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c96085e2db..852641f60c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -28,6 +28,7 @@ Version 1.1.8 work in progress - Enh #2273: Used better merging algorithm to build query parameters that are of array type in CUrlManager (Qiang) - Enh #2299: Added CAssetManager.newFileMode and newDirMode (Qiang) - Enh #2325: Added $option parameter to CDbCommand::select() to support special SELECT syntax (Qiang) +- Enh #2341: More verbose log message for CModel::onUnsafeAttribute. Added model class (Sam Dark) - Enh #2357: Documented CWebApplication accessors with @property for better IDE autocomplete (Sam Dark) - Enh #2361: Added CDbConnection::pdoClass that allows to specify and use custom PDO wrapper class (Sam Dark) - Enh #2389: MessageCommand now accepts overwrite option determining if merge result will overwrite existing file (Sam Dark) diff --git a/framework/base/CModel.php b/framework/base/CModel.php index f06d1aeab6..b5a0ea3d2e 100644 --- a/framework/base/CModel.php +++ b/framework/base/CModel.php @@ -499,7 +499,7 @@ public function unsetAttributes($names=null) public function onUnsafeAttribute($name,$value) { if(YII_DEBUG) - Yii::log(Yii::t('yii','Failed to set unsafe attribute "{attribute}".',array('{attribute}'=>$name)),CLogger::LEVEL_WARNING); + Yii::log(Yii::t('yii','Failed to set unsafe attribute "{attribute}" of "{class}".',array('{attribute}'=>$name, '{class}'=>get_class($this))),CLogger::LEVEL_WARNING); } /**