aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/install/helper/container_factory.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/install/helper/container_factory.php')
-rw-r--r--phpBB/phpbb/install/helper/container_factory.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/phpbb/install/helper/container_factory.php b/phpBB/phpbb/install/helper/container_factory.php
index 255f8f428e..eb44b470b7 100644
--- a/phpBB/phpbb/install/helper/container_factory.php
+++ b/phpBB/phpbb/install/helper/container_factory.php
@@ -93,9 +93,26 @@ class container_factory
* @param string $param_name
*
* @return mixed
+ *
+ * @throws \phpbb\install\exception\cannot_build_container_exception When container cannot be built
*/
public function get_parameter($param_name)
{
+ // Check if container was built, if not try to build it
+ if ($this->container === null)
+ {
+ // Check whether container can be built
+ // We need config.php for that so let's check if it has been set up yet
+ if (filesize($this->phpbb_root_path . 'config.' . $this->php_ext))
+ {
+ $this->build_container();
+ }
+ else
+ {
+ throw new cannot_build_container_exception();
+ }
+ }
+
return $this->container->getParameter($param_name);
}