From 53ac6eeb2800f8c75a2114540494586b6fbd0fa4 Mon Sep 17 00:00:00 2001 From: Matthieu Marcillaud <marcimat@rezo.net> Date: Tue, 5 Nov 2013 13:52:11 +0000 Subject: [PATCH] =?UTF-8?q?2=20notices=20php=20apr=C3=A8s=20l'installation?= =?UTF-8?q?=20:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - l'appel de $GLOBALS['meta']['xx'] est toujours problématique : cela crée une notice dès que xx n'existe pas (ou pas encore). Il serait plus perenne d'utiliser lire_config() tout le temps plutôt que de mettre, comme ici, un isset() de plus disgracieux. - le debuggeur dans l'espace privé n'a pas de globale 'fond' accessible. --- ecrire/inc/presentation_mini.php | 2 +- ecrire/public/debusquer.php | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ecrire/inc/presentation_mini.php b/ecrire/inc/presentation_mini.php index 28a2eee6c4..401a672a0a 100644 --- a/ecrire/inc/presentation_mini.php +++ b/ecrire/inc/presentation_mini.php @@ -189,7 +189,7 @@ function html_tests_js(){ **/ function info_maj_spip(){ - $maj = $GLOBALS['meta']['info_maj_spip']; + $maj = isset($GLOBALS['meta']['info_maj_spip']) ? $GLOBALS['meta']['info_maj_spip'] : null; if (!$maj) return ""; diff --git a/ecrire/public/debusquer.php b/ecrire/public/debusquer.php index 2bc2b4c6ec..f63396e33a 100644 --- a/ecrire/public/debusquer.php +++ b/ecrire/public/debusquer.php @@ -63,8 +63,12 @@ function public_debusquer_dist($message = '', $lieu = ''){ $urgence = (_DEBUG_MAX_SQUELETTE_ERREURS AND count($tableau_des_erreurs)>_DEBUG_MAX_SQUELETTE_ERREURS); if (!$urgence) return; } - if (empty($debug_objets['principal'])) - $debug_objets['principal'] = $GLOBALS['fond']; + if (empty($debug_objets['principal'])) { + // espace public ? + if (isset($GLOBALS['fond'])) { + $debug_objets['principal'] = $GLOBALS['fond']; + } + } include_spip('inc/autoriser'); if (!autoriser('debug')) return; -- GitLab