Closed StalkAlex closed 7 years ago
There is no such bug in 2.0.10, so it's not db related problem. If issue will be confirmed, may this be fixed in 2.0.11.2? It looks serious.
Probably. Can you find out which commit breaks it using git bisect
?
Yep. I'll check.
@samdark found commit that causes this bug https://github.com/yiisoft/yii2/commit/23790272dc561aacf2070cbbda396f49e44cbb7d
To fix it a check should be added that will read all data from the stream. possibly via http://php.net/manual/en/function.stream-get-contents.php
@cebe Like this? https://github.com/StalkAlex/yii2/commit/5a76ef110e99d377b1f79a2b814656da45a7b610 Checked in own project, it worked. I could make PR.
Looks OK.
There is now a 2.0.11.2 release including this fix. https://github.com/yiisoft/yii2/blob/2.0.11.2/framework/CHANGELOG.md#20112-february-08-2017
Good news, thanks!
This problem remain also in the 2.0.11.2 version in the method loadFromCache() in DbManager class (line 990). Could you fix it? Thank you
@simonevallana it's fixed in 2.0.12 which isn't released yet.
@samdark Perfect, thank you.
turns out RBAC tests do not cover pgsql and sqlite, even though they suggest they should.
fixed by fa4d762..67b9a57
What steps will reproduce the problem?
Trying to create permission
data of rule is
O:24:"app\rules\TestRule":3:{s:4:"name";s:14:"TestOnly";s:9:"createdAt";i:1485582849;s:9:"updatedAt";i:1485582849;}
What do you get instead?
Error
Here's screen. As it seen data variable isn't sting anymore but resource stream.
Additional info