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

[Bug] "Using $this when not in object context" when i use related model #21

Closed
pana1990 opened this issue Mar 30, 2018 · 2 comments
Closed

Comments

@pana1990
Copy link
Contributor

I get the following error "Using $this when not in object context" when i use related model.

Example code :

$file = \Yii::createObject([
                'class' => ExcelFile::class,
                'sheets' => [
                    'MoneyMovements' => [
                        'class' => ActiveExcelSheet::class,
                        'query' => User::find(),
                        'attributes' => [
                            'id',
                            'address.street', // related model
                        ],
                    ],
                ],
            ]);

screenshot_1

@pana1990
Copy link
Contributor Author

@mikehaertl check my pr please #22

@mikehaertl
Copy link
Collaborator

@pana1990 Just released 2.7.1 containing this fix. Thanks for finding this bug.

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

No branches or pull requests

2 participants