Browse Source

éviter un warning "Trying to access array offset on value of type null" lors de la suppression d'un document

dev/providers-interdits
b_b 3 months ago
parent
commit
580206085a
  1. 3
      oembed_pipelines.php

3
oembed_pipelines.php

@ -76,7 +76,8 @@ function oembed_recuperer_fond($flux){
$flux['data']['texte'] = str_replace($t = '<!--editer_url-->', $t . $i, $flux['data']['texte']);
} elseif ($flux['args']['fond'] === 'modeles/document_case') {
$infos_doc = sql_fetsel('id_document, mode, media, oembed', 'spip_documents', 'id_document=' . intval($flux['args']['contexte']['id_document']));
if (in_array($infos_doc['media'], array('video', 'audio'))
if ($infos_doc
and in_array($infos_doc['media'], array('video', 'audio'))
and ($infos_doc['mode']=='document')
and (strlen($infos_doc['oembed'])>1)){
$info_vignette = '<span>' . _T('medias:info_inclusion_vignette') . '</span>';

Loading…
Cancel
Save