Skip to content

Commit

Permalink
[5.x] Allow using value as a field handle (#10462)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Jul 16, 2024
1 parent a47c061 commit a074cb4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Data/AbstractAugmented.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private function methodExistsOnData(string $handle, string $method): bool
{
return method_exists($this->data, $method)
&& collect($this->keys())->contains(Str::snake($handle))
&& ! in_array($handle, ['hook']);
&& ! in_array($handle, ['hook', 'value']);
}

protected function getFromData($handle)
Expand Down
1 change: 0 additions & 1 deletion src/Fields/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ public static function commonFieldOptions(): Fields
'resource',
'status',
'unless',
'value', // todo: can be removed when https:/statamic/cms/issues/2495 is resolved
'views',
];

Expand Down

0 comments on commit a074cb4

Please sign in to comment.