Skip to content

Commit

Permalink
Merge pull request #3227 from paulbalandan/use-throwable
Browse files Browse the repository at this point in the history
Use Throwable in catch block of filesystem helper
  • Loading branch information
michalsn authored Jul 5, 2020
2 parents 76816f2 + ab4ac38 commit 8b09ab8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions system/Helpers/filesystem_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 [];
}
Expand Down

0 comments on commit 8b09ab8

Please sign in to comment.