2amigos / yii2-editable-widget

X-Editable Widget for Yii2
Other
58 stars 20 forks source link

Improved model checks #16

Closed SDKiller closed 9 years ago

SDKiller commented 9 years ago

\yii\widgets\InputWidget::hasModel checks if $model instanceof \yii\base\Model

But \yii\base\Model have no methods getPrimaryKey() and getIsNewRecord() - they are implemented in ActiveRecord

Althow this widget is mostly supposed to work with ActiveRecord, I think better avoid throwing errors in other Model cases.

tonydspaniard commented 9 years ago

Agree @SDKiller thanks