diff --git a/packages/actions/src/Concerns/CanExportRecords.php b/packages/actions/src/Concerns/CanExportRecords.php index 42c764cf5c..15f2332ef6 100644 --- a/packages/actions/src/Concerns/CanExportRecords.php +++ b/packages/actions/src/Concerns/CanExportRecords.php @@ -240,7 +240,10 @@ protected function setUp(): void ) ->dispatch(); - if (($jobConnection !== 'sync') || (blank($jobConnection) && (config('queue.default') !== 'sync'))) { + if ( + (filled($jobConnection) && ($jobConnection !== 'sync')) || + (blank($jobConnection) && (config('queue.default') !== 'sync')) + ) { Notification::make() ->title($action->getSuccessNotificationTitle()) ->body(trans_choice('filament-actions::export.notifications.started.body', $export->total_rows, [ diff --git a/packages/actions/src/Concerns/CanImportRecords.php b/packages/actions/src/Concerns/CanImportRecords.php index 58da1ed0c9..86f92fb2c5 100644 --- a/packages/actions/src/Concerns/CanImportRecords.php +++ b/packages/actions/src/Concerns/CanImportRecords.php @@ -308,7 +308,8 @@ protected function setUp(): void ]), ) ->when( - ($jobConnection === 'sync') || (blank($jobConnection) && (config('queue.default') === 'sync')), + (filled($jobConnection) && ($jobConnection === 'sync')) || + (blank($jobConnection) && (config('queue.default') === 'sync')), fn (Notification $notification) => $notification ->persistent() ->send(), @@ -317,7 +318,10 @@ protected function setUp(): void }) ->dispatch(); - if (($jobConnection !== 'sync') || (blank($jobConnection) && (config('queue.default') !== 'sync'))) { + if ( + (filled($jobConnection) && ($jobConnection !== 'sync')) || + (blank($jobConnection) && (config('queue.default') !== 'sync')) + ) { Notification::make() ->title($action->getSuccessNotificationTitle()) ->body(trans_choice('filament-actions::import.notifications.started.body', $import->total_rows, [ diff --git a/packages/actions/src/Exports/Jobs/ExportCompletion.php b/packages/actions/src/Exports/Jobs/ExportCompletion.php index 2ebb5c1205..d7c5645c5f 100644 --- a/packages/actions/src/Exports/Jobs/ExportCompletion.php +++ b/packages/actions/src/Exports/Jobs/ExportCompletion.php @@ -75,7 +75,8 @@ public function handle(): void )), ) ->when( - ($this->connection === 'sync') || (blank($this->connection) && (config('queue.default') === 'sync')), + (filled($this->connection) && ($this->connection === 'sync')) || + (blank($this->connection) && (config('queue.default') === 'sync')), fn (Notification $notification) => $notification ->persistent() ->send(),