From e98671e40489da84d3b9f3728e54dd41f5f6713f Mon Sep 17 00:00:00 2001 From: gauthier Date: Fri, 24 Apr 2020 15:22:38 +0200 Subject: [PATCH 1/3] FIX : Access to undeclared static property: Contact::$table_element --- htdocs/core/tpl/advtarget.tpl.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 07b7744e2f8..a40f1214af1 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -459,7 +459,8 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { // Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementype = Contact::$table_element; + $contactstatic = new Contact($db); + $elementype = $contactstatic->table_element; // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); $extrafields = new ExtraFields($db); From a685026756fc1046bfb5426947006de9cb4fff5f Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 24 Apr 2020 17:22:35 +0200 Subject: [PATCH 2/3] fix: remove php warning --- htdocs/compta/accounting-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index b8e10e7d0e3..665ab6ce485 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -23,7 +23,7 @@ * \brief Page to show portoflio and files of a thirdparty and download it */ -if ($_GET['action'] == 'dl' || $_POST['action'] == 'dl') { // To not replace token when downloading file +if (array_key_exists('action', $_GET) && $_GET['action'] == 'dl' || array_key_exists('action', $_POST) && $_POST['action'] == 'dl') { // To not replace token when downloading file if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); } From 4564a5cffd7e6c2f1f8ab81db902f8036622d693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 19:01:08 +0200 Subject: [PATCH 3/3] Update accounting-files.php --- htdocs/compta/accounting-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 665ab6ce485..83f735c1eeb 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -23,7 +23,7 @@ * \brief Page to show portoflio and files of a thirdparty and download it */ -if (array_key_exists('action', $_GET) && $_GET['action'] == 'dl' || array_key_exists('action', $_POST) && $_POST['action'] == 'dl') { // To not replace token when downloading file +if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); }