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.
This commit is contained in:
mudrd8mz 2009-09-04 21:53:24 +00:00
parent d8e761eed2
commit eeecf5a704

View file

@ -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));
}
/**