Fix countable error (#30839)

This commit is contained in:
hansemschnokeloch 2024-09-04 21:18:11 +02:00 committed by GitHub
parent e318a739be
commit bab6c9bc68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1108,7 +1108,7 @@ if ($action == 'create') {
// Document model
include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php';
$list = ModelePdfExpedition::liste_modeles($db);
if (count($list) > 1) {
if (is_countable($list) && count($list) > 1) {
print "<tr><td>".$langs->trans("DefaultModel")."</td>";
print '<td colspan="3">';
print img_picto('', 'pdf', 'class="pictofixedwidth"');