From cc1a713fd832de70aafd8a580bc650caf5237ca4 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 7 Aug 2014 14:24:38 +0200 Subject: [PATCH 1/2] [ticket/12826] Add mandatory root namespace indicator to exception catching. PHPBB3-12826 --- phpBB/phpbb/cache/driver/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index b32af32d25..2d538b739c 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -208,7 +208,7 @@ class file extends \phpbb\cache\driver\base { $iterator = new \DirectoryIterator($this->cache_dir); } - catch (Exception $e) + catch (\Exception $e) { return; } @@ -259,7 +259,7 @@ class file extends \phpbb\cache\driver\base { $iterator = new \DirectoryIterator($dir); } - catch (Exception $e) + catch (\Exception $e) { return; } From e523711ec2a8690de44748fc7382b7701f2fa6b1 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Thu, 7 Aug 2014 14:25:53 +0200 Subject: [PATCH 2/2] [ticket/12826] Add optional root namespace indicator for consistency. PHPBB3-12826 --- phpBB/includes/acp/acp_board.php | 2 +- phpBB/includes/functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 1811748c2f..f2707f15ca 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -925,7 +925,7 @@ class acp_board { $user->timezone = new DateTimeZone($config['board_timezone']); } - catch (Exception $e) + catch (\Exception $e) { // If the board timezone is invalid, we just use the users timezone. } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d7b1b56532..4318b20b97 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1031,7 +1031,7 @@ function phpbb_get_timezone_identifiers($selected_timezone) $validate_timezone = new DateTimeZone($selected_timezone); $timezones[] = $selected_timezone; } - catch (Exception $e) + catch (\Exception $e) { } }