diff --git a/htdocs/blockedlog/admin/blockedlog_archives.php b/htdocs/blockedlog/admin/blockedlog_archives.php index c6d711a04c1..700adef9973 100644 --- a/htdocs/blockedlog/admin/blockedlog_archives.php +++ b/htdocs/blockedlog/admin/blockedlog_archives.php @@ -376,6 +376,7 @@ if ($action == 'export' && $user->hasRight('blockedlog', 'read')) { // read is $concatenateddata = $block_static->buildKeyForSignature(); // Version line archive VE1=sha256 + $signatureexport = ''; if ($formatexport == 'VE1') { // Note: The signature on export line is not used. It has been replaced with a global signature on all file. $signatureexport = dol_hash($previoushashexport.$concatenateddata, 'sha256'); @@ -777,6 +778,7 @@ if ($action == 'check' || $action == 'checkconfirmed') { $reg = array(); $period = ''; + $regnumber = ''; $formatexport = ''; if (preg_match('/\speriod=([^\s]+)/', $line, $reg)) { $period = $reg[1]; // Get period on first line @@ -884,24 +886,24 @@ if ($action == 'check' || $action == 'checkconfirmed') { $lineanalyzed = 1; $linetech = $line[0]; - $block_static->id = $line[1]; - $block_static->date_creation = $line[2]; - $block_static->action = $lineactioncode = $line[3]; - $block_static->module_source = $line[4]; + $block_static->id = (int) $line[1]; + $block_static->date_creation = (string) $line[2]; + $block_static->action = $lineactioncode = (string) $line[3]; + $block_static->module_source = (string) $line[4]; $block_static->amounts_taxexcl = $lineamountht = $line[5]; $block_static->amounts = $lineamountttc = $line[6]; - $block_static->ref_object = $lineref = $line[7]; - $block_static->date_object = $line[8]; - $block_static->user_fullname = $line[9]; - $block_static->linktoref = $line[10]; - $block_static->linktype = $line[11]; - $block_static->object_data = json_decode($line[12]); - $block_static->object_version = $line[13]; - $block_static->object_format = $line[14]; - $block_static->signature = $line[15]; + $block_static->ref_object = $lineref = (string) $line[7]; + $block_static->date_object = (string) $line[8]; + $block_static->user_fullname = (string) $line[9]; + $block_static->linktoref = (string) $line[10]; + $block_static->linktype = (string) $line[11]; + $block_static->object_data = json_decode((string) $line[12]); + $block_static->object_version = (string) $line[13]; + $block_static->object_format = (string) $line[14]; + $block_static->signature = (string) $line[15]; // Status from file: 'Valid' or 'KO' - $statusline = $line[16]; + $statusline = (string) $line[16]; // Status revalidated from calculation using the HMAC secret key (possible only when we are on the same instance than // the one hosting the initial database of the archive) diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index edcc64b8f94..35e64572768 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -324,7 +324,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear'); diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index b0a7fa92d62..438b11096dc 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -307,7 +307,7 @@ if ($object->id > 0) { $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear'); diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 712735c0328..b93a08f2ede 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -339,7 +339,7 @@ if ($object->id > 0) { $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear'); diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 3bfeda941b0..9b534ad266f 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -251,7 +251,7 @@ if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear'); diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php index 9456df8ff7b..2ccbd2320d3 100644 --- a/htdocs/projet/agenda.php +++ b/htdocs/projet/agenda.php @@ -245,7 +245,7 @@ if (!empty($object->id)) { $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear'); @@ -258,7 +258,7 @@ if (!empty($object->id)) { $param .= '&dateevent_endday='.GETPOSTINT('dateevent_endday'); } - + // Try to know count of actioncomm from cache require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; $cachekey = 'count_events_project_'.$object->id; $nbEvent = dol_getcache($cachekey); diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 9dbcb742990..6af9aff6b68 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -241,7 +241,7 @@ if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $param .= '&search_complete='.urlencode($search_complete); } if ($search_filtert != '') { - $param .= '&search_filtert='.urlencode($search_filtert); + $param .= '&search_filtert='.urlencode((string) $search_filtert); } if ($search_dateevent_start != '') { $param .= '&dateevent_startyear='.GETPOSTINT('dateevent_startyear');