diff --git a/Controller/Logger/ClerkLogger.php b/Controller/Logger/ClerkLogger.php index 51cbed7..6ffc1d5 100644 --- a/Controller/Logger/ClerkLogger.php +++ b/Controller/Logger/ClerkLogger.php @@ -367,7 +367,9 @@ public function log($Message, $Metadata) } - curl_close($curl); + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } } elseif ($this->Log_to == 'file') { @@ -442,7 +444,9 @@ public function error($Message, $Metadata) } - curl_close($curl); + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } } elseif ($this->Log_to == 'file') { @@ -521,7 +525,9 @@ public function warn($Message, $Metadata) } - curl_close($curl); + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } } elseif ($this->Log_to == 'file') { diff --git a/Model/Adapter/Product.php b/Model/Adapter/Product.php index 19bd661..5585cf0 100644 --- a/Model/Adapter/Product.php +++ b/Model/Adapter/Product.php @@ -717,7 +717,7 @@ protected function addFieldHandlers() foreach ($productsArray as $bundle_item) { $bundle_option_min_stock = 0; foreach ($bundle_item as $bundle_option) { - if ((integer)$bundle_option['min_qty'] <= $bundle_option['stock']) { + if ((int)$bundle_option['min_qty'] <= $bundle_option['stock']) { $bundle_option_min_stock = ($bundle_option_min_stock == 0) ? $bundle_option['stock'] : $bundle_option_min_stock; $bundle_option_min_stock = ($bundle_option_min_stock < $bundle_option['stock']) ? $bundle_option['stock'] : $bundle_option_min_stock; } @@ -768,7 +768,7 @@ protected function addFieldHandlers() foreach ($productsArray as $bundle_item) { $bundle_option_min_stock = 0; foreach ($bundle_item as $bundle_option) { - if ((integer)$bundle_option['min_qty'] <= $bundle_option['stock']) { + if ((int)$bundle_option['min_qty'] <= $bundle_option['stock']) { $bundle_option_min_stock = ($bundle_option_min_stock == 0) ? $bundle_option['stock'] : $bundle_option_min_stock; $bundle_option_min_stock = ($bundle_option_min_stock < $bundle_option['stock']) ? $bundle_option['stock'] : $bundle_option_min_stock; } diff --git a/Model/Api.php b/Model/Api.php index 7a775e8..02c6bde 100644 --- a/Model/Api.php +++ b/Model/Api.php @@ -180,7 +180,11 @@ private function _curl_get($url, $params = []) $curl = curl_init($url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); - curl_close($curl); + + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } + return $response; } catch (\Exception $e) { @@ -201,7 +205,11 @@ private function _curl_post($url, $params = []) } curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($curl); - curl_close($curl); + + if (PHP_VERSION_ID < 80000) { + curl_close($curl); + } + return $response; } catch (\Exception $e) {