From d45ad25e06a9b637dc9b3310f5d2f9b06c50748a Mon Sep 17 00:00:00 2001 From: paoloar77 Date: Mon, 17 Jun 2024 15:27:42 +0200 Subject: [PATCH] aa --- app/CustomFuncPao.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/CustomFuncPao.php b/app/CustomFuncPao.php index 52e81424..adb771fc 100644 --- a/app/CustomFuncPao.php +++ b/app/CustomFuncPao.php @@ -1406,7 +1406,8 @@ function updateArticoloFromGM($idarticolo) ->orderBy('dataOra', 'desc') ->get(); - if ($articles->count() > 0) { + // se $articles รจ un array + if (count($articles) > 0) { $article = $articles[0]; } else { $article = null;