aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/captcha_gd.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/captcha/captcha_gd.php')
-rw-r--r--phpBB/includes/captcha/captcha_gd.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index c513c45fe7..e76358d2a7 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -137,7 +137,13 @@ class captcha
{
global $phpbb_root_path;
- $dr = opendir($phpbb_root_path . 'includes/captcha/fonts');
+ $dr = @opendir($phpbb_root_path . 'includes/captcha/fonts');
+
+ if (!$dr)
+ {
+ trigger_error('Unable to open includes/captcha/fonts directory.', E_USER_ERROR);
+ }
+
while (false !== ($entry = readdir($dr)))
{
if (strtolower(pathinfo($entry, PATHINFO_EXTENSION)) == 'ttf')