Unverified Commit 60b4ce21 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(simpleplugin) Fix Attribute::serializeAttribute

get_class returns the namespaced name of the class, which broke this
 function.

issue #6175
Showing with 3 additions and 4 deletions
+3 -4
......@@ -664,13 +664,12 @@ class Attribute
function serializeAttribute (array &$attributes, bool $form = TRUE)
{
if (!$form || $this->visible) {
$class = get_class($this);
while ($class != 'Attribute') {
$class = get_class($this);
$type = [];
while ($class != FALSE) {
$type[] = $class;
$class = get_parent_class($class);
}
/* Avoid empty array */
$type[] = 'Attribute';
$infos = [
'htmlid' => $this->getHtmlId(),
'label' => $this->getLabel(),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment