Prevent extra config from bleeding to other definitions

This commit is contained in:
Samuel Georges 2016-09-28 13:26:28 +10:00
parent baefa3e50d
commit b3fe8de7fb
1 changed files with 3 additions and 4 deletions

View File

@ -399,10 +399,9 @@ class RelationController extends ControllerBehavior
* Apply options and extra config
*/
$allowConfig = ['readOnly', 'recordUrl'];
if ($extraConfig = array_only($options, $allowConfig)) {
$this->extraConfig = $extraConfig;
$this->applyExtraConfig($extraConfig, $field);
}
$extraConfig = array_only($options, $allowConfig);
$this->extraConfig = $extraConfig;
$this->applyExtraConfig($extraConfig, $field);
/*
* Initialize