From 822b81913fbd0df0642f8660e05a296f10176a2a Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sat, 25 Feb 2023 14:38:32 +0100 Subject: [PATCH 1/3] Fix dol_print_date warning --- htdocs/fichinter/class/fichinter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 376e14c277f..d880673530d 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -1738,8 +1738,8 @@ class FichinterLigne extends CommonObjectLine $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter"; $sql .= " SET duree = ".((int) $total_duration); - $sql .= " , dateo = ".(!empty($obj->dateo) ? "'".$this->db->idate($obj->dateo)."'" : "null"); - $sql .= " , datee = ".(!empty($obj->datee) ? "'".$this->db->idate($obj->datee)."'" : "null"); + $sql .= " , dateo = ".(!empty($obj->dateo) ? "'".$this->db->escape($obj->dateo)."'" : "null"); + $sql .= " , datee = ".(!empty($obj->datee) ? "'".$this->db->escape($obj->datee)."'" : "null"); $sql .= " WHERE rowid = ".((int) $this->fk_fichinter); dol_syslog("FichinterLigne::update_total", LOG_DEBUG); From 014aec72c22479ea92acedec0486b0a664e76415 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Sun, 26 Feb 2023 11:12:06 +0100 Subject: [PATCH 2/3] fix : Warning: Undefined array key height in /home/httpd/vhosts/aflac.fr/domains/dev.aflac.fr/httpdocs/core/lib/pdf.lib.php on line 2513 --- htdocs/core/lib/pdf.lib.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 206fbb7b1c4..97425c00465 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2510,6 +2510,8 @@ function pdf_getSizeForImage($realpath) $maxheight = (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT) ? 32 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_HEIGHT); include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp = dol_getImageSize($realpath); + $width = 0; + $height = 0; if ($tmp['height']) { $width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth From 9f2c450953487606627a2efbf6eca60bef5230f4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 26 Feb 2023 10:17:38 +0000 Subject: [PATCH 3/3] Fixing style errors. --- htdocs/core/lib/pdf.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 97425c00465..49e0672e462 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2511,7 +2511,7 @@ function pdf_getSizeForImage($realpath) include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp = dol_getImageSize($realpath); $width = 0; - $height = 0; + $height = 0; if ($tmp['height']) { $width = (int) round($maxheight * $tmp['width'] / $tmp['height']); // I try to use maxheight if ($width > $maxwidth) { // Pb with maxheight, so i use maxwidth