mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 20:19:42 +08:00
PHP 7.4 fixes
- Fix `Model::activeAttributes()` to access array offset on value of non-string - Fix incorrect decoding of default binary value for PostgreSQL - Fix incorrect type-casting of reflection type to string
This commit is contained in:
committed by
GitHub
parent
c7f07cce94
commit
69b1966b4a
@ -819,7 +819,7 @@ class Model extends Component implements StaticInstanceInterface, IteratorAggreg
|
||||
}
|
||||
$attributes = array_keys(array_flip($scenarios[$scenario]));
|
||||
foreach ($attributes as $i => $attribute) {
|
||||
if ($attribute[0] === '!') {
|
||||
if (strncmp($attribute, '!', 1) === 0) {
|
||||
$attributes[$i] = substr($attribute, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user