From c40c88f9c852a485b12fb2fbc3ce3e44f3c494c2 Mon Sep 17 00:00:00 2001 From: "florian.azizian" <florian.azizian@maarch.org> Date: Wed, 14 Mar 2018 18:15:06 +0100 Subject: [PATCH] FIX #7395 check numeric for address --- modules/content_management/save_attachment_from_cm.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/content_management/save_attachment_from_cm.php b/modules/content_management/save_attachment_from_cm.php index b862d97cf72..3637af17b4c 100755 --- a/modules/content_management/save_attachment_from_cm.php +++ b/modules/content_management/save_attachment_from_cm.php @@ -152,7 +152,7 @@ if ($arrayIsAllowed['status'] == false) { array_push($_SESSION['data'], array( 'column' => "validation_date", 'value' => $func->format_date_db($_SESSION['attachmentInfo']['back_date']), 'type' => "date", ) ); } - if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] != '' && is_numeric($_SESSION['attachmentInfo']['contactId'])) { + if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] <> '' && is_numeric($_SESSION['attachmentInfo']['contactId'])) { array_push($_SESSION['data'], array( 'column' => 'dest_contact_id', 'value' => $_SESSION['attachmentInfo']['contactId'], 'type' => 'integer' ) ); } else if (isset($_SESSION['attachmentInfo']['contactId']) && $_SESSION['attachmentInfo']['contactId'] != '' && !is_numeric($_SESSION['attachmentInfo']['contactId'])) { $_SESSION['data'][] = [ @@ -162,7 +162,7 @@ if ($arrayIsAllowed['status'] == false) { ]; } - if (isset($_SESSION['attachmentInfo']['addressId']) && $_SESSION['attachmentInfo']['addressId'] <> '') { + if (isset($_SESSION['attachmentInfo']['addressId']) && $_SESSION['attachmentInfo']['addressId'] <> '' && is_numeric($_SESSION['attachmentInfo']['addressId'])) { array_push($_SESSION['data'], array( 'column' => "dest_address_id", 'value' => $_SESSION['attachmentInfo']['addressId'], 'type' => "integer" ) ); } -- GitLab