From 50b2989cf01fb9a5bb54d198290e23793dff59cf Mon Sep 17 00:00:00 2001 From: Tristan Darricau <tristan.darricau@sensiolabs.com> Date: Sun, 13 Sep 2015 18:51:33 +0200 Subject: [PATCH] [ticket/11150] PHP 5.4 compatibility PHPBB3-11150 --- phpBB/phpbb/composer/installer.php | 4 ++-- phpBB/phpbb/composer/manager.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/phpbb/composer/installer.php b/phpBB/phpbb/composer/installer.php index 856ef2f6eb..61289b7135 100644 --- a/phpBB/phpbb/composer/installer.php +++ b/phpBB/phpbb/composer/installer.php @@ -33,7 +33,7 @@ use phpbb\exception\runtime_exception; */ class installer { - const PHPBB_TYPES = ['phpbb-extension', 'phpbb-style', 'phpbb-language']; + const PHPBB_TYPES = 'phpbb-extension,phpbb-style,phpbb-language'; /** * @var array Repositories to look packages from @@ -268,7 +268,7 @@ class installer { try { - $this->generate_ext_json_file($this->do_get_installed_packages(self::PHPBB_TYPES)); + $this->generate_ext_json_file($this->do_get_installed_packages(explode(',', self::PHPBB_TYPES))); $io = new NullIO(); $composer = Factory::create($io, $this->get_composer_ext_json_filename(), false); diff --git a/phpBB/phpbb/composer/manager.php b/phpBB/phpbb/composer/manager.php index 5f7f2e28d9..64ab0ccb7c 100644 --- a/phpBB/phpbb/composer/manager.php +++ b/phpBB/phpbb/composer/manager.php @@ -173,7 +173,7 @@ class manager implements manager_interface { if ($this->all_managed_packages === null) { - $this->all_managed_packages = $this->installer->get_installed_packages(installer::PHPBB_TYPES); + $this->all_managed_packages = $this->installer->get_installed_packages(explode(',', installer::PHPBB_TYPES)); } return $this->all_managed_packages;