From dc282fbe7239c91ec43fa2cf2946bf8d7212b5cc Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Tue, 3 Apr 2007 15:47:59 +0000 Subject: [PATCH] prevenir un tas de warning lors du changement de format du cache des plugins --- ecrire/inc/plugin.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ecrire/inc/plugin.php b/ecrire/inc/plugin.php index f18efe6826..ab18d30e52 100644 --- a/ecrire/inc/plugin.php +++ b/ecrire/inc/plugin.php @@ -243,14 +243,16 @@ function ecrire_plugin_actifs($plugin,$pipe_recherche=false,$operation='raz'){ if (isset($info['pipeline']) AND is_array($info['pipeline'])){ foreach($info['pipeline'] as $pipe){ $nom = $pipe['nom']; - if (isset($pipe['action'])) - $action = $pipe['action']; - else - $action = $nom; - if (!isset($GLOBALS['spip_pipeline'][$nom])) // creer le pipeline eventuel - $GLOBALS['spip_pipeline'][$nom]=""; - if (strpos($GLOBALS['spip_pipeline'][$nom],"|$prefix$action")===FALSE) - $GLOBALS['spip_pipeline'][$nom] .= "|$prefix$action"; + if (is_string($nom)) { + if (isset($pipe['action'])) + $action = $pipe['action']; + else + $action = $nom; + if (!isset($GLOBALS['spip_pipeline'][$nom])) // creer le pipeline eventuel + $GLOBALS['spip_pipeline'][$nom]=""; + if (strpos($GLOBALS['spip_pipeline'][$nom],"|$prefix$action")===FALSE) + $GLOBALS['spip_pipeline'][$nom] .= "|$prefix$action"; + } if (isset($pipe['inclure'])){ $GLOBALS['spip_matrice']["$prefix$action"] = "_DIR_PLUGINS$plug/".$pipe['inclure']; -- GitLab