This commit is contained in:
paoloar77
2024-08-14 15:38:04 +02:00
parent e92186c803
commit 88d417bf7a

View File

@@ -478,7 +478,7 @@ function showTest()
{ {
$codarticolo = "16670"; $codarticolo = "16670";
$mystr = '*** TEST: codarticolo: ' . $codarticolo; $mystr = '*** TEST: codarticolo: ' . $codarticolo . PHP_EOL;
if ($codarticolo) { if ($codarticolo) {
try { try {
$product = Product::where('sku', $codarticolo)->first(); $product = Product::where('sku', $codarticolo)->first();
@@ -486,7 +486,8 @@ function showTest()
$mystr .= "Errore: " . $e->getMessage(); $mystr .= "Errore: " . $e->getMessage();
} }
$mystr .= getarraystr($product); if (isset($product) && isset($product['id']))
$mystr += $product['id'] . ' ';
} }
return $mystr; return $mystr;