Skip to content

Commit

Permalink
fix(dropdownfield): compatibility with Tags plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienClairembault authored Jul 9, 2020
1 parent 3d1ef1c commit c40177a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions inc/fields/dropdownfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,11 @@ public function parseObjectProperties(
) {
global $TRANSLATE;

// This feature is not available for PluginFormcreatorTagField
if (static::class == PluginFormcreatorTagField::class) {
return $content;
}

// Get ID from question
// $questionID = $question->fields['id'];
$questionID = $this->getQuestion()->getID();
Expand All @@ -578,8 +583,8 @@ public function parseObjectProperties(
$itemtype = $json->itemtype;
}

// In some case, there is no itemtype (PluginFormcreatorTagField)
if (empty($itemtype)) {
// Safe check
if (empty($itemtype) || !class_exists($itemtype)) {
return $content;
}

Expand Down

0 comments on commit c40177a

Please sign in to comment.