diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-01-09 15:32:11 +0100 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-01-09 15:35:17 +0100 |
| commit | 6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f (patch) | |
| tree | b8ca5fe922f7a5cd9a867dd03760040430a25980 /phpBB/phpbb | |
| parent | 7f8b6c02c6380d44d2bc3c402cfa5e9953d4819b (diff) | |
| download | forums-6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f.tar forums-6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f.tar.gz forums-6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f.tar.bz2 forums-6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f.tar.xz forums-6594ef8b1e0b63f911fbcc2b8859fcfb09977e2f.zip | |
[ticket/14306] CS and correctly handle exception loop
PHPBB3-14306
Diffstat (limited to 'phpBB/phpbb')
| -rw-r--r-- | phpBB/phpbb/di/container_builder.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index d90f78c0d9..433847b285 100644 --- a/phpBB/phpbb/di/container_builder.php +++ b/phpBB/phpbb/di/container_builder.php @@ -107,6 +107,9 @@ class container_builder */ private $container_extensions; + /** @var \Exception */ + private $build_exception; + /** * Constructor * @@ -126,7 +129,8 @@ class container_builder */ public function get_container() { - try { + try + { $container_filename = $this->get_container_filename(); $config_cache = new ConfigCache($container_filename, defined('DEBUG')); if ($this->use_cache && $config_cache->isFresh()) @@ -197,8 +201,10 @@ class container_builder throw $e; } - try + if ($this->build_exception === null) { + $this->build_exception = $e; + return $this ->without_extensions() ->without_cache() @@ -207,10 +213,10 @@ class container_builder ])) ->get_container(); } - catch (\Exception $_) + else { // Rethrow the original exception if it's still failing - throw $e; + throw $this->build_exception; } } } |
