File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,15 @@ public function buildRequest(): array
113113 $ this ->action_info = json_decode ($ this ->action_info , true );
114114 }
115115
116+ $ columns = ['action_name ' , 'action_info ' ];
117+
118+ if (!is_null ($ this ->expire_seconds ) && is_numeric ($ this ->expire_seconds )) {
119+ $ this ->expire_seconds = min ($ this ->expire_seconds , 30 * 86400 );
120+ array_push ($ columns ,'expire_seconds ' );
121+ }
122+
116123 if (!is_null ($ this ->getActionInfo ())) {
117- return parent ::toArray ([ ' action_name ' , ' action_info ' ] );
124+ return parent ::toArray ($ columns );
118125 }
119126
120127 $ scene = [];
@@ -130,14 +137,6 @@ public function buildRequest(): array
130137 'scene ' => $ scene
131138 ];
132139
133-
134- $ columns = ['action_name ' , 'action_info ' ];
135-
136- if (!is_null ($ this ->expire_seconds ) && is_numeric ($ this ->expire_seconds )) {
137- $ this ->expire_seconds = min ($ this ->expire_seconds , 30 * 86400 );
138- array_push ($ columns ,'expire_seconds ' );
139- }
140-
141140 return parent ::toArray ($ columns );
142141 }
143142}
You can’t perform that action at this time.
0 commit comments