@@ -146,7 +146,9 @@ public function complexSearch(
146146 $ httpCode = curl_getinfo ($ curl , CURLINFO_HTTP_CODE );
147147 }
148148
149- curl_close ($ curl );
149+ if (PHP_VERSION_ID < 80000 ) {
150+ curl_close ($ curl );
151+ }
150152 if ($ fullResponse === true ) {
151153 return self ::fullDataResponse ($ response , $ page , $ limit , $ error_msg , $ httpCode );
152154 }
@@ -205,7 +207,9 @@ public function filterSearch(
205207 $ httpCode = curl_getinfo ($ curl , CURLINFO_HTTP_CODE );
206208 }
207209
208- curl_close ($ curl );
210+ if (PHP_VERSION_ID < 80000 ) {
211+ curl_close ($ curl );
212+ }
209213 if ($ fullResponse === true ) {
210214 return self ::fullDataResponse ($ response , $ page , $ limit , $ error_msg , $ httpCode );
211215 }
@@ -360,7 +364,9 @@ public function syncDataElasticsearch($data, $action, $id, $index)
360364 if (curl_errno ($ curl )) {
361365 $ error_msg = curl_error ($ curl );
362366 }
363- curl_close ($ curl );
367+ if (PHP_VERSION_ID < 80000 ) {
368+ curl_close ($ curl );
369+ }
364370
365371 if (isset ($ error_msg )) {
366372 // echo 'error sync :' . $id . '__:' . json_encode($error_msg) . 'id :' . $index . 'action :' . $action . PHP_EOL;
@@ -490,7 +496,9 @@ public static function createIndexElasticsearch($index, $listFields, $specialFie
490496 if (curl_errno ($ curl )) {
491497 $ error_msg = curl_error ($ curl );
492498 }
493- curl_close ($ curl );
499+ if (PHP_VERSION_ID < 80000 ) {
500+ curl_close ($ curl );
501+ }
494502
495503 if (isset ($ error_msg )) {
496504 // Log::info('error sync :' . $index . '__:' . json_encode($error_msg));
0 commit comments