aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/overall_header.html8
-rw-r--r--phpBB/phpbb/di/container_builder.php14
2 files changed, 14 insertions, 8 deletions
diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html
index 4212f01f15..3feb94f89c 100644
--- a/phpBB/adm/style/overall_header.html
+++ b/phpBB/adm/style/overall_header.html
@@ -146,10 +146,10 @@ function popup(url, width, height, name)
<div id="main">
<div class="main">
- <!-- IF CONTAINER_EXCEPTION !== false -->
+ {% if CONTAINER_EXCEPTION !== false %}
<div class="errorbox">
- <p>{L_CONTAINER_EXCEPTION}</p>
- <p>{L_EXCEPTION}{L_COLON} {{ CONTAINER_EXCEPTION.getMessage() }}</p>
+ <p>{{ lang('CONTAINER_EXCEPTION') }}</p>
+ <p>{{ lang('EXCEPTION') }}{{ lang('COLON') }} {{ CONTAINER_EXCEPTION.getMessage() }}</p>
<pre>{{ CONTAINER_EXCEPTION.getTraceAsString() }}</pre>
</div>
- <!-- ENDIF -->
+ {% endif %}
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;
}
}
}