From ab4ac3817ab738c1daab2f8b88090e8dd7fe93d1 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Sun, 5 Jul 2020 11:23:07 +0800 Subject: [PATCH] Use Throwable in catch block of filesystem helper --- system/Helpers/filesystem_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/Helpers/filesystem_helper.php b/system/Helpers/filesystem_helper.php index 0eb6851aa5a2..bf0353c78bf8 100644 --- a/system/Helpers/filesystem_helper.php +++ b/system/Helpers/filesystem_helper.php @@ -94,7 +94,7 @@ function directory_map(string $source_dir, int $directory_depth = 0, bool $hidde closedir($fp); return $fileData; } - catch (\Exception $fe) + catch (\Throwable $e) { return []; } @@ -138,7 +138,7 @@ function write_file(string $path, string $data, string $mode = 'wb'): bool return is_int($result); } - catch (\Exception $fe) + catch (\Throwable $e) { return false; } @@ -320,7 +320,7 @@ function get_dir_file_info(string $source_dir, bool $top_level_only = true, bool return $fileData; } } - catch (\Exception $fe) + catch (\Throwable $fe) { return []; }