From 7bcaae86f4b9656302a544805a316282e6591805 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 11 Jan 2023 13:33:29 +0100 Subject: [PATCH 1/3] Fix php 8 warning --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d928931c9ab..e5c9dcb3127 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2514,7 +2514,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } elseif ($value == 'type_duration') { print ''; - print $form->selectTypeDuration('', $obj->{$value}, array('i','h')); + print $form->selectTypeDuration('', (!empty($obj->{$value}) ? $obj->{$value}:''), array('i','h')); print ''; } else { $fieldValue = isset($obj->{$value}) ? $obj->{$value}: ''; From 4afc21ecb3bad84f1cddafbda7cf9cb8277693f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Jan 2023 20:39:09 +0100 Subject: [PATCH 2/3] Update dict.php --- htdocs/admin/dict.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index e5c9dcb3127..1bf360dccf7 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2510,11 +2510,11 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } elseif ($value == 'block_if_negative') { print ''; - print $form->selectyesno("block_if_negative", (!empty($obj->{$value}) ? $obj->{$value}:''), 1); + print $form->selectyesno("block_if_negative", (empty($obj->block_if_negative) ? '' : $obj->block_if_negative), 1); print ''; } elseif ($value == 'type_duration') { print ''; - print $form->selectTypeDuration('', (!empty($obj->{$value}) ? $obj->{$value}:''), array('i','h')); + print $form->selectTypeDuration('', empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h')); print ''; } else { $fieldValue = isset($obj->{$value}) ? $obj->{$value}: ''; From 71ea83d19e1886f81836d2d79c71aadcf20e5cad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 11 Jan 2023 20:40:15 +0100 Subject: [PATCH 3/3] Update dict.php --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 1bf360dccf7..4919e377c9c 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -2514,7 +2514,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } elseif ($value == 'type_duration') { print ''; - print $form->selectTypeDuration('', empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h')); + print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h')); print ''; } else { $fieldValue = isset($obj->{$value}) ? $obj->{$value}: '';