octicon-rss(16/)
You've already forked yii2
mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 02:13:17 +08:00
Fixes #13961: RBAC Rules: PostgreSQL: PHP Warning "unserialize() expects parameter 1 to be string, resource given" was fixed
This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
committed by
Alexander Makarov
gitea-unlock(16/)
parent
510cd3541d
commit
d2fb17f444
octicon-diff(16/tw-mr-1) 2 changed files with 6 additions and 1 deletions
@@ -63,6 +63,7 @@ Yii Framework 2 Change Log
|
|||||||
- Enh #13560: Refactored `\yii\widgets\FragmentCache::getCachedContent()`, added tests (Kolyunya)
|
- Enh #13560: Refactored `\yii\widgets\FragmentCache::getCachedContent()`, added tests (Kolyunya)
|
||||||
- Bug #13901: Fixed passing unused parameter to `formatMessage()` call in `\yii\validators\IpValidator` (Kolyunya)
|
- Bug #13901: Fixed passing unused parameter to `formatMessage()` call in `\yii\validators\IpValidator` (Kolyunya)
|
||||||
- Enh #13945: Removed Courier New from error page fonts list since it looks bad on Linux (samdark)
|
- Enh #13945: Removed Courier New from error page fonts list since it looks bad on Linux (samdark)
|
||||||
|
- Bug #13961: RBAC Rules: PostgreSQL: PHP Warning "unserialize() expects parameter 1 to be string, resource given" was fixed (vsguts)
|
||||||
|
|
||||||
2.0.11.2 February 08, 2017
|
2.0.11.2 February 08, 2017
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|||||||
@@ -987,7 +987,11 @@ class DbManager extends BaseManager
|
|||||||
$query = (new Query)->from($this->ruleTable);
|
$query = (new Query)->from($this->ruleTable);
|
||||||
$this->rules = [];
|
$this->rules = [];
|
||||||
foreach ($query->all($this->db) as $row) {
|
foreach ($query->all($this->db) as $row) {
|
||||||
$this->rules[$row['name']] = unserialize($row['data']);
|
$data = $row['data'];
|
||||||
|
if (is_resource($data)) {
|
||||||
|
$data = stream_get_contents($data);
|
||||||
|
}
|
||||||
|
$this->rules[$row['name']] = unserialize($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = (new Query)->from($this->itemChildTable);
|
$query = (new Query)->from($this->itemChildTable);
|
||||||
|
|||||||
Reference in New Issue
Block a user