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;