From 0d980a82beeb27c96877f25b3e18d533a9f2e94e Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@git-test.afi-sa.fr> Date: Mon, 30 Sep 2013 14:25:25 +0000 Subject: [PATCH] Suppression warnings dans error_log --- library/Class/AvisNotice.php | 2 +- library/Class/NoticeHtml.php | 4 ++-- library/ZendAfi/View/Helper/Notice/FacettesTypeDoc.php | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/library/Class/AvisNotice.php b/library/Class/AvisNotice.php index 7a5290412af..3ca25557369 100644 --- a/library/Class/AvisNotice.php +++ b/library/Class/AvisNotice.php @@ -284,7 +284,7 @@ class Class_AvisNotice extends Storm_Model_Abstract { public function isVisibleForUser($user) { - if ($this->getUser() == null || $this->getIdUser() == $user->ID_USER) + if ($this->getUser() == null || ($user && ($this->getIdUser() == $user->ID_USER))) return true; return $this->isWaitingForModeration() == false; diff --git a/library/Class/NoticeHtml.php b/library/Class/NoticeHtml.php index 455f00e01ad..d5c45e5514e 100644 --- a/library/Class/NoticeHtml.php +++ b/library/Class/NoticeHtml.php @@ -187,7 +187,7 @@ class Class_NoticeHtml { //------------------------------------------------------------------------------------------------------ public function getInterviews($source, $videos, $width, $height) { if(!$videos) - return $html.$this->getNonTrouve($this->_translate->_("Aucune vidéo n'a été trouvée."),true); + return $this->getNonTrouve($this->_translate->_("Aucune vidéo n'a été trouvée."),true); $html=$this->haut_onglet; $html.='<table width="100%" cellspacing="0">'; @@ -281,7 +281,7 @@ class Class_NoticeHtml { $plage++; $img_ecoute=""; // Amazon - if($notice["asin"]) { + if(isset($notice["asin"])) { $id_div=$notice["asin"]."_".$volume."_".$plage; $js_video="chercher_videos('".$id_div."','".addslashes($notice["auteur"])."','".addslashes($morceau["titre"])."')"; $img_video=sprintf('<img src="%s" border="0" onclick="%s" style="cursor:pointer" title="%s" alt="%s" />', diff --git a/library/ZendAfi/View/Helper/Notice/FacettesTypeDoc.php b/library/ZendAfi/View/Helper/Notice/FacettesTypeDoc.php index 154f8f16f46..db8b4feb008 100644 --- a/library/ZendAfi/View/Helper/Notice/FacettesTypeDoc.php +++ b/library/ZendAfi/View/Helper/Notice/FacettesTypeDoc.php @@ -23,6 +23,9 @@ class ZendAfi_View_Helper_Notice_FacettesTypeDoc extends Zend_View_Helper_HtmlEl $html = '<div class="facettes_type_doc">'; $html .= '<h1>Quels types de resultat ?</h1>'; + if (!isset($facettes['T'])) + $facettes['T'] = []; + foreach($facettes['T'] as $facette) { if (!is_array($facette)) continue; -- GitLab