From 58708b7cf02129da0a7ee5e3bba85ac72c31f3f5 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sat, 22 Oct 2011 11:56:04 +0200 Subject: [PATCH] Fix: hide php error message if dir not exist --- htdocs/admin/system/modules.php | 8 ++++---- htdocs/user/perms.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index d7f68fbe605..08bcd0329ed 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -1,7 +1,7 @@ - * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2010 Regis Houssin +/* Copyright (C) 2005-2009 Laurent Destailleur + * Copyright (C) 2007 Rodolphe Quiedeville + * Copyright (C) 2010-2011 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,7 +74,7 @@ foreach ($conf->file->dol_document_root as $type => $dirroot) // Load list of modules foreach($modulesdir as $dir) { - $handle=opendir($dir); + $handle=@opendir($dir); if (is_resource($handle)) { while (($file = readdir($handle))!==false) diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 0ebbc059b96..618a9a560c4 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -150,7 +150,7 @@ foreach ($conf->file->dol_document_root as $type => $dirroot) foreach($modulesdir as $dir) { - $handle=opendir($dir); + $handle=@opendir($dir); if (is_resource($handle)) { while (($file = readdir($handle))!==false)