mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 04:37:42 +08:00
Fix #19670: Fix Error null check PHP 8.1 yii\rbac\DbManager
This commit is contained in:
@ -17,6 +17,7 @@ Yii Framework 2 Change Log
|
|||||||
- Bug #19316: Fix MysqlMutex with same connection but difference database (kamarton)
|
- Bug #19316: Fix MysqlMutex with same connection but difference database (kamarton)
|
||||||
- Bug #19507: Fix eager loading of nested one-to-many relations (spo0okie)
|
- Bug #19507: Fix eager loading of nested one-to-many relations (spo0okie)
|
||||||
- Bug #19546: Reverted #19309 (bizley)
|
- Bug #19546: Reverted #19309 (bizley)
|
||||||
|
- Bug #19670: Fix Error null check PHP 8.1 `yii\rbac\DbManager` (samuelexyz)
|
||||||
- Bug #19520: Fix for TIMESTAMP & ROWVERSION columns in MSSQL insert query (darkdef)
|
- Bug #19520: Fix for TIMESTAMP & ROWVERSION columns in MSSQL insert query (darkdef)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -654,7 +654,9 @@ class DbManager extends BaseManager
|
|||||||
if (is_resource($data)) {
|
if (is_resource($data)) {
|
||||||
$data = stream_get_contents($data);
|
$data = stream_get_contents($data);
|
||||||
}
|
}
|
||||||
|
if ($data === null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return unserialize($data);
|
return unserialize($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -675,8 +677,10 @@ class DbManager extends BaseManager
|
|||||||
if (is_resource($data)) {
|
if (is_resource($data)) {
|
||||||
$data = stream_get_contents($data);
|
$data = stream_get_contents($data);
|
||||||
}
|
}
|
||||||
|
if ($data) {
|
||||||
$rules[$row['name']] = unserialize($data);
|
$rules[$row['name']] = unserialize($data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
@ -1013,8 +1017,10 @@ class DbManager extends BaseManager
|
|||||||
if (is_resource($data)) {
|
if (is_resource($data)) {
|
||||||
$data = stream_get_contents($data);
|
$data = stream_get_contents($data);
|
||||||
}
|
}
|
||||||
|
if ($data) {
|
||||||
$this->rules[$row['name']] = unserialize($data);
|
$this->rules[$row['name']] = unserialize($data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$query = (new Query())->from($this->itemChildTable);
|
$query = (new Query())->from($this->itemChildTable);
|
||||||
$this->parents = [];
|
$this->parents = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user