What's Changed
Bug Fixes
- Fixed
Call to a member function makeGetUtility() on nullerror when using$get(or$set) as a parameter in the->media()closure when the action is not attached to a schema component (e.g. header actions, table row actions, page actions).
Behavior
- Inside a schema context (form, infolist, suffix/prefix action on a field):
$getand$setwork as expected. - Outside a schema context:
$getand$setare now safelynullinstead of throwing — your closure can guard against it (e.g.if ($get) { ... }).
Example
MediaAction::make('media-url')
->media(fn ($get, $record) => $get
? $get('media_url')
: $record->url
)Full Changelog: v5.0.0.0...v5.0.0.1