From 7bf8006b67f6a2f56317fb6c4ab25ca623757ba5 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 4 Apr 2016 21:32:46 +0200 Subject: [PATCH] [ticket/14198] Use the build option to calculate the container cache filename PHPBB3-14198 --- phpBB/phpbb/di/container_builder.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/di/container_builder.php b/phpBB/phpbb/di/container_builder.php index 7bfe1bbb87..b9284d04be 100644 --- a/phpBB/phpbb/di/container_builder.php +++ b/phpBB/phpbb/di/container_builder.php @@ -556,7 +556,13 @@ class container_builder */ protected function get_container_filename() { - return $this->get_cache_dir() . 'container_' . md5($this->phpbb_root_path) . '.' . $this->php_ext; + $container_params = [ + 'phpbb_root_path' => $this->phpbb_root_path, + 'use_extensions' => $this->use_extensions, + 'config_path' => $this->config_path, + ]; + + return $this->get_cache_dir() . 'container_' . md5(implode(',', $container_params)) . '.' . $this->php_ext; } /** @@ -566,7 +572,13 @@ class container_builder */ protected function get_autoload_filename() { - return $this->get_cache_dir() . 'autoload_' . md5($this->phpbb_root_path) . '.' . $this->php_ext; + $container_params = [ + 'phpbb_root_path' => $this->phpbb_root_path, + 'use_extensions' => $this->use_extensions, + 'config_path' => $this->config_path, + ]; + + return $this->get_cache_dir() . 'autoload_' . md5(implode(',', $container_params)) . '.' . $this->php_ext; } /**