From 1f6f1f1e81d7facbe2915ac5d85173d73850be07 Mon Sep 17 00:00:00 2001 From: erational Date: Thu, 6 Oct 2022 10:17:06 +0200 Subject: [PATCH] fix: warning en moins sur creators et length --- inc/zotspip.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/zotspip.php b/inc/zotspip.php index 45562d7..b0746b3 100644 --- a/inc/zotspip.php +++ b/inc/zotspip.php @@ -135,7 +135,7 @@ function zotspip_maj_items($forcer = false, $n = null, $id_zcollection = '') { list($balise, $attributs) = spip_xml_decompose_tag($link); if ($attributs['rel'] == 'enclosure') { $insertion['fichier'] = $attributs['href']; - $insertion['poids'] = $attributs['length']; + $insertion['poids'] = isset($attributs['length']) ? $attributs['length'] : ''; } if ($attributs['rel'] == 'up') { $insertion['id_parent'] = zotspip_extraire_itemkey($attributs['href']); @@ -247,7 +247,7 @@ function zotspip_maj_items($forcer = false, $n = null, $id_zcollection = '') { // Gestion des creators $creators = []; - if (is_array($data['creators'])) { + if (isset($data['creators']) && is_array($data['creators'])) { $rang = 1; foreach ($data['creators'] as $creator) { $creators[] = [