mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 22:30:27 +08:00
Fix #18269: Fix integer safe attribute to work properly in yii\base\Model
This commit is contained in:

committed by
GitHub

parent
b680494d6b
commit
e348c0f460
@ -798,7 +798,7 @@ class Model extends Component implements StaticInstanceInterface, IteratorAggreg
|
||||
}
|
||||
$attributes = [];
|
||||
foreach ($scenarios[$scenario] as $attribute) {
|
||||
if ($attribute[0] !== '!' && !in_array('!' . $attribute, $scenarios[$scenario])) {
|
||||
if (strncmp($attribute, '!', 1) !== 0 && !in_array('!' . $attribute, $scenarios[$scenario])) {
|
||||
$attributes[] = $attribute;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user