From f6486d332d477eece5bbaedda51daee42fc6d650 Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 27 Jun 2010 17:32:08 +0100 Subject: [PATCH] hide disk_free_space errors --- ext/upload/main.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index 706fff04..89722346 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -41,7 +41,14 @@ class Upload implements Extension { global $config, $database, $page, $user; if(is_null($this->theme)) $this->theme = get_theme_object($this); - $is_full = (disk_free_space(realpath("./images/")) < 100*1024*1024); + // fucking PHP "security" measures -_-;;; + $free_num = @disk_free_space(realpath("./images/")); + if($free_num === FALSE) { + $is_full = false; + } + else { + $is_full = $free_num < 100*1024*1024; + } if($event instanceof InitExtEvent) { $config->set_default_int('upload_count', 3);