From 3f3c3640cc9231de9c97ecec1c109bc2a4cf0871 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 9 Mar 2009 16:26:59 +0100 Subject: [PATCH] [svn r18871] Minor - Adding if file_exists condition to avoid warning message --- index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.php b/index.php index 4e19efa2cd..366a0b9f6e 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,4 @@ -, Ghent University, Refactoring -* @version $Id: index.php 18470 2009-02-12 15:33:51Z juliomontoya $ +* @version $Id: index.php 18871 2009-03-09 15:26:59Z juliomontoya $ * @todo check the different @todos in this page and really do them * @todo check if the news management works as expected */ @@ -472,7 +472,8 @@ function display_anonymous_right_menu() { } // includes for any files to be displayed below anonymous right menu - if (!file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_get_contents($home.'home_notice.html')!='') { + + if (!file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_exists($home.'home_notice.html') && file_get_contents($home.'home_notice.html')!='') { echo '
'; if (file_exists($home.'home_notice.html')) include ($home.'home_notice.html'); @@ -480,7 +481,7 @@ function display_anonymous_right_menu() { include ($home_old.'home_notice.html'); } echo '
'; - } elseif(file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_get_contents($home.'home_notice_'.$user_selected_language.'.html')!='') { + } elseif(file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_exists($home.'home_notice_'.$user_selected_language.'.html') && file_get_contents($home.'home_notice_'.$user_selected_language.'.html')!='') { echo '
'; include($home.'home_notice_'.$user_selected_language.'.html'); echo '
';