From eeecf5a704bcd68bcb3add466f0e8c9af4f13fba Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Fri, 4 Sep 2009 21:53:24 +0000 Subject: [PATCH] Fixing an incorrect concatenate of CSS classes arrays array + array does not add new items if their numeric keys are the same. This lead to the bug that add_classes() did not work correctly. --- lib/outputcomponents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outputcomponents.php b/lib/outputcomponents.php index bc1618d2d5..df9d76297a 100644 --- a/lib/outputcomponents.php +++ b/lib/outputcomponents.php @@ -109,7 +109,7 @@ class moodle_html_component { * @return void */ public function add_classes($classes) { - $this->classes += self::clean_classes($classes); + $this->classes = array_merge($this->classes, self::clean_classes($classes)); } /** -- 2.39.5