Skip to content

Commit 5f69dc3

Browse files
committed
last fix for itemtype (missing in previous pr)
same
1 parent 81c5700 commit 5f69dc3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

inc/tag.class.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ public function showForm($ID, $options = array()) {
8484
}
8585
}
8686
$type_menu_values = json_decode($this->fields['type_menu']);
87-
if ($type_menu_values === false
88-
|| $type_menu_values === NULL) {
87+
if (!is_array($type_menu_values)) {
8988
$type_menu_values = [];
9089
}
9190

@@ -310,8 +309,8 @@ static function getSpecificValueToDisplay($field, $values, array $options = arra
310309
switch ($field) {
311310
case 'type_menu':
312311
$itemtypes = json_decode($values[$field]);
313-
if (json_last_error() !== JSON_ERROR_NONE) {
314-
return __("None");
312+
if (!is_array($itemtypes)) {
313+
return " ";
315314
}
316315
$itemtype_names = [];
317316
foreach ($itemtypes as $itemtype) {

0 commit comments

Comments
 (0)