fix error

This commit is contained in:
paoloar77
2024-06-20 15:26:21 +02:00
parent 04f98608c3
commit da8c6f1853
2 changed files with 6 additions and 2 deletions

View File

@@ -68,6 +68,9 @@ class ProductLogger
public function addLog($type, $message)
{
if ($type === '') {
$type = 'LOG';
}
if (!isset($this->logs[$type])) {
$this->logs[$type] = "";
}

View File

@@ -2193,7 +2193,7 @@ Route::post('/updatecreate', function (Request $request) {
if ($codifica) {
} else {
$orderdetail->CodArticoloGM = intval($prodotto['sku']);
$productLogger->addLog('', '$orderdetail->CodArticoloGM' . $orderdetail->CodArticoloGM);
$productLogger->addLog('', '$orderdetail->CodArticoloGM= ' . $orderdetail->CodArticoloGM);
}
$productLogger->addLog('', 'sku=' . $sku);
@@ -2254,6 +2254,7 @@ Route::post('/updatecreate', function (Request $request) {
} //end if status
} catch (Exception $e) {
Log::error($e->getMessage());
$productLogger->setLogandSendEmail('Nuovo Ordine ERRORE !');
}
});