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:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user