From feff0769ed2e146bfb13892776524e59fb44559b Mon Sep 17 00:00:00 2001
From: "tcharlss@hotmail.fr" <>
Date: Tue, 9 Dec 2014 15:42:26 +0000
Subject: [PATCH] =?UTF-8?q?=C3=A9viter=20une=20notice=20php=20quand=20un?=
 =?UTF-8?q?=20doc=20n'a=20pas=20d'extension=20(=3F)=20->=20strpos():=20Emp?=
 =?UTF-8?q?ty=20needle?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 inc/documents.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inc/documents.php b/inc/documents.php
index 0e7b3a09..0eb4912e 100644
--- a/inc/documents.php
+++ b/inc/documents.php
@@ -149,8 +149,8 @@ function vignette_automatique($img, $doc, $lien, $x=0, $y=0, $align='', $class='
 
 function image_du_document($document)
 {
-	$e = $document['extension'];
-	if ((strpos($GLOBALS['meta']['formats_graphiques'], $e) !== false)
+	if ($e = $document['extension']
+	  AND (strpos($GLOBALS['meta']['formats_graphiques'], $e) !== false)
 	  AND (!test_espace_prive() OR $GLOBALS['meta']['creer_preview']=='oui')
 	  AND $document['fichier']) {
 		if ($document['distant'] == 'oui') {
-- 
GitLab