From c80cf87b90eefab664ecf69f29796f9390a3ff17 Mon Sep 17 00:00:00 2001 From: Mate Bartus Date: Sat, 27 Jun 2015 12:49:10 +0200 Subject: [PATCH] [ticket/13961] Allow the collection to be modified runtime PHPBB3-13961 --- phpBB/phpbb/di/ordered_service_collection.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/phpBB/phpbb/di/ordered_service_collection.php b/phpBB/phpbb/di/ordered_service_collection.php index 46f397a004..046012ae5b 100644 --- a/phpBB/phpbb/di/ordered_service_collection.php +++ b/phpBB/phpbb/di/ordered_service_collection.php @@ -90,14 +90,9 @@ class ordered_service_collection extends service_collection */ public function add($service_id, $order = 0) { - if ($this->is_ordered) - { - return; - } - $order = (int) $order; - $this->service_ids[$order][] = $service_id; + $this->is_ordered = false; } protected function sort_services() @@ -107,6 +102,7 @@ class ordered_service_collection extends service_collection return; } + $this->exchangeArray(array()); ksort($this->service_ids); foreach ($this->service_ids as $service_order_group) {