From 382b51383c84fbb7f861fcd87b0b71b35c9f2869 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 26 Feb 2014 18:41:59 +0200 Subject: Don't use error suppression on is_dir(), file_exists() --- system/helpers/captcha_helper.php | 2 +- system/helpers/directory_helper.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'system/helpers') diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php index 13926774e..78eac4be0 100644 --- a/system/helpers/captcha_helper.php +++ b/system/helpers/captcha_helper.php @@ -82,7 +82,7 @@ if ( ! function_exists('create_captcha')) } if ($img_path === '' OR $img_url === '' - OR ! @is_dir($img_path) OR ! is_really_writable($img_path) + OR ! is_dir($img_path) OR ! is_really_writable($img_path) OR ! extension_loaded('gd')) { return FALSE; diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index 84ad35894..0bbe7fe97 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -69,9 +69,9 @@ if ( ! function_exists('directory_map')) continue; } - @is_dir($source_dir.$file) && $file .= DIRECTORY_SEPARATOR; + is_dir($source_dir.$file) && $file .= DIRECTORY_SEPARATOR; - if (($directory_depth < 1 OR $new_depth > 0) && @is_dir($source_dir.$file)) + if (($directory_depth < 1 OR $new_depth > 0) && is_dir($source_dir.$file)) { $filedata[$file] = directory_map($source_dir.$file, $new_depth, $hidden); } -- cgit v1.2.3-24-g4f1b