Suppress errors when checking for the existence of files that might be restricted by open_basedir - should resolve issue #1310

This commit is contained in:
CiaranG 2009-04-21 23:36:15 +01:00
parent 4cb0a92980
commit ec5e06a542
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ $_config_files[] = INSTALLDIR.'/config.php';
$_have_a_config = false; $_have_a_config = false;
foreach ($_config_files as $_config_file) { foreach ($_config_files as $_config_file) {
if (file_exists($_config_file)) { if (@file_exists($_config_file)) {
include_once($_config_file); include_once($_config_file);
$_have_a_config = true; $_have_a_config = true;
} }

View File

@ -966,7 +966,7 @@ function common_root_url($ssl=false)
function common_good_rand($bytes) function common_good_rand($bytes)
{ {
// XXX: use random.org...? // XXX: use random.org...?
if (file_exists('/dev/urandom')) { if (@file_exists('/dev/urandom')) {
return common_urandom($bytes); return common_urandom($bytes);
} else { // FIXME: this is probably not good enough } else { // FIXME: this is probably not good enough
return common_mtrand($bytes); return common_mtrand($bytes);