File tree Expand file tree Collapse file tree 2 files changed +6
-18
lines changed
Expand file tree Collapse file tree 2 files changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -47,19 +47,13 @@ public function load(string $workflowId): WorkflowInterrupt
4747 throw new WorkflowException ("No saved workflow found for ID: {$ workflowId }. " );
4848 }
4949
50- $ interruptData = @unserialize (
51- base64_decode ((string ) $ record ['interrupt ' ], true )
52- );
50+ $ interruptData = base64_decode ((string ) $ record ['interrupt ' ], true );
5351
5452 if ($ interruptData === false ) {
55- $ interruptData = unserialize ( $ record ['interrupt ' ]) ; // This makes sure that previous records still work
53+ $ interruptData = $ record ['interrupt ' ]; // This makes sure that previous records still work
5654 }
5755
58- if ($ interruptData === false ) {
59- throw new WorkflowException ("Failed to unserialize saved workflow for ID: {$ workflowId }. " );
60- }
61-
62- return $ interruptData ;
56+ return unserialize ($ interruptData );
6357 }
6458
6559 public function delete (string $ workflowId ): void
Original file line number Diff line number Diff line change @@ -43,19 +43,13 @@ public function load(string $workflowId): WorkflowInterrupt
4343 ->where ('workflow_id ' , $ workflowId )
4444 ->firstOr (['interrupt ' ], fn () => throw new WorkflowException ("No saved workflow found for ID: {$ workflowId }. " ));
4545
46- $ interruptData = @unserialize (
47- base64_decode ($ record ->interrupt , true )
48- );
46+ $ interruptData = base64_decode ($ record ->interrupt , true );
4947
5048 if ($ interruptData === false ) {
51- $ interruptData = unserialize ( $ record ->interrupt ) ; // This makes sure that previous records still work
49+ $ interruptData = $ record ->interrupt ; // This makes sure that previous records still work
5250 }
5351
54- if ($ interruptData === false ) {
55- throw new WorkflowException ("Failed to unserialize saved workflow for ID: {$ workflowId }. " );
56- }
57-
58- return $ interruptData ;
52+ return unserialize ($ interruptData );
5953 }
6054
6155 public function delete (string $ workflowId ): void
You can’t perform that action at this time.
0 commit comments