Skip to content

Commit f2014b3

Browse files
Add error logging for missing Script Executor in console mode
1 parent 47a5274 commit f2014b3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎ProcessMaker/Models/ScriptExecutor.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace ProcessMaker\Models;
44

55
use Illuminate\Database\Eloquent\ModelNotFoundException;
6+
use Illuminate\Support\Facades\Log;
67
use Illuminate\Validation\Rule;
78
use Illuminate\Validation\Rules\Enum;
89
use ProcessMaker\Enums\ScriptExecutorType;
@@ -94,7 +95,13 @@ public static function initialExecutor($language)
9495
->orderBy('created_at', 'asc')
9596
->first();
9697
if (!$initialExecutor) {
97-
throw new ScriptLanguageNotSupported($language);
98+
if (app()->runningInConsole()) {
99+
Log::error('Script Executor not found for language: ' . $language);
100+
101+
return null;
102+
} else {
103+
throw new ScriptLanguageNotSupported($language);
104+
}
98105
}
99106

100107
return $initialExecutor;

0 commit comments

Comments
 (0)