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:
Alexander Makarov
2019-12-10 15:08:45 +03:00
committed by GitHub
parent c7f07cce94
commit 69b1966b4a
5 changed files with 9 additions and 4 deletions

View File

@ -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);
}
}