File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ Yii Framework 2 Change Log
66
66
- Enh #19401 : Delay ` exit(1) ` in ` yii\base\ErrorHandler::handleFatalError ` (arrilot)
67
67
- Enh #19416 : Update and improve configurations for ` yii\console\controllers\MessageController ` (WinterSilence)
68
68
- Enh #19420 : Update list of JS callbacks in ` yii\widgets\MaskedInput ` (WinterSilence)
69
+ - Chg #19354 : Reuse ` Validator::getAttributeNames() ` in ` AttributeTypecastBehavior::detectAttributeTypes() ` (WinterSilence)
69
70
- Enh #19437 : Add support to specify request port by trusted proxies in ` \yii\web\Request::getServerPort() ` (rhertogh)
70
71
71
72
Original file line number Diff line number Diff line change @@ -293,9 +293,7 @@ protected function detectAttributeTypes()
293
293
}
294
294
295
295
if ($ type !== null ) {
296
- foreach ((array ) $ validator ->attributes as $ attribute ) {
297
- $ attributeTypes [ltrim ($ attribute , '! ' )] = $ type ;
298
- }
296
+ $ attributeTypes += array_fill_keys ($ validator ->getAttributeNames (), $ type );
299
297
}
300
298
}
301
299
You can’t perform that action at this time.
0 commit comments