Skip to content

Commit

Permalink
Used is_subclass_of() as suggested by @SamMousa
Browse files Browse the repository at this point in the history
  • Loading branch information
samdark committed Jan 14, 2017
1 parent 4c2e511 commit 442ac04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/widgets/ActiveField.php
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ public function widget($class, $config = [])
$config['model'] = $this->model;
$config['attribute'] = $this->attribute;
$config['view'] = $this->form->getView();
if (isset(class_parents($class)['yii\widgets\InputWidget'])) {
if (is_subclass_of($class, 'yii\widgets\InputWidget')) {
$config['field'] = $this;
if (isset($config['options'])) {
$this->addAriaAttributes($config['options']);
Expand Down

0 comments on commit 442ac04

Please sign in to comment.