From b55f5a37d5b32c44c5f6e0a0e33d3cd0f64bf27d Mon Sep 17 00:00:00 2001 From: fran Date: Mon, 8 Jun 2026 09:44:13 -0400 Subject: [PATCH] fix(export): resolve missing data tables in ODT export using isset --- inc/common.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/common.class.php b/inc/common.class.php index 7d778a99..6752bd75 100644 --- a/inc/common.class.php +++ b/inc/common.class.php @@ -1251,7 +1251,7 @@ public static function generateOdt($params) /** @var array $LANG */ global $LANG; - $config = ['PATH_TO_TMP' => GLPI_DOC_DIR . '/_tmp']; + $config = ['PATH_TO_TMP' => GLPI_TMP_DIR]; $category = ''; $description = ''; @@ -1310,7 +1310,7 @@ public static function generateOdt($params) } else { $singledatas->setVars('datas_title', mb_strtoupper(__s('data', 'mreporting')), false, 'utf-8'); foreach ($datas as $key => $value) { - if (property_exists($singledatas, 'datas') && $singledatas->datas !== null) { + if (isset($singledatas->datas) || $singledatas->datas !== null) { $singledatas->datas->row($key, ENT_NOQUOTES, 'utf-8'); $singledatas->datas->value($value, ENT_NOQUOTES, 'utf-8'); $singledatas->datas->merge();