]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Suppress errors when checking for the existence of files that might be restricted...
authorCiaranG <ciaran@ciarang.com>
Tue, 21 Apr 2009 22:36:15 +0000 (23:36 +0100)
committerCiaranG <ciaran@ciarang.com>
Tue, 21 Apr 2009 22:36:15 +0000 (23:36 +0100)
lib/common.php
lib/util.php

index b3882d207958b2dd211519aa9136c7210f641c9b..f983c4d168c278aa00cb5ed554fb06f8937db526 100644 (file)
@@ -192,7 +192,7 @@ $_config_files[] = INSTALLDIR.'/config.php';
 $_have_a_config = false;
 
 foreach ($_config_files as $_config_file) {
-    if (file_exists($_config_file)) {
+    if (@file_exists($_config_file)) {
         include_once($_config_file);
         $_have_a_config = true;
     }
index e0eda0114b7101e046c55df94a3cb95919550bd4..e1dd238ba886a44bce93331bbf4120767d527874 100644 (file)
@@ -966,7 +966,7 @@ function common_root_url($ssl=false)
 function common_good_rand($bytes)
 {
     // XXX: use random.org...?
-    if (file_exists('/dev/urandom')) {
+    if (@file_exists('/dev/urandom')) {
         return common_urandom($bytes);
     } else { // FIXME: this is probably not good enough
         return common_mtrand($bytes);