Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpandRowColumn - Cannot use object of type Closure as array #257

Closed
Shin1gami opened this issue Mar 25, 2015 · 0 comments
Closed

ExpandRowColumn - Cannot use object of type Closure as array #257

Shin1gami opened this issue Mar 25, 2015 · 0 comments
Labels

Comments

@Shin1gami
Copy link

As the doc says $detailOptions can be either array or Closure, so passing an anonymous function like this:

'detailOptions' => function($model) {
    return ['data' => ['something' => $model->something]];
}

Causes exception:

exception 'yii\base\ErrorException' with message
'Cannot use object of type Closure as array'
in /srv/www/ds3/vendor/yiisoft/yii2/helpers/BaseHtml.php:1705

I guess it's beacuse of Html::addCssClass($this->detailOptions, 'skip-export'); (row 223)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants