diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 610bd875c4f..6a719c25b5f 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2012 Mikael Carlavan * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017 Pierre-Henry Favre - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,8 +44,8 @@ $action = GETPOST('action', 'alpha'); $id = GETPOST('id', 'int'); $apply_to = GETPOST('apply_to'); -$fk_user = GETPOST('fk_user'); -$fk_usergroup = GETPOST('fk_usergroup'); +$fk_user = GETPOST('fk_user', 'int'); +$fk_usergroup = GETPOST('fk_usergroup', 'int'); $fk_c_type_fees = GETPOST('fk_c_type_fees'); $code_expense_rules_type = GETPOST('code_expense_rules_type'); @@ -97,11 +97,11 @@ if ($action == 'save') $object->setValues($_POST); if($apply_to=='U'){ - $object->fk_user=$fk_user; + $object->fk_user = (int) $fk_user; $object->fk_usergroup=0; $object->is_for_all=0; }elseif($apply_to=='G'){ - $object->fk_usergroup=$fk_usergroup; + $object->fk_usergroup = (int) $fk_usergroup; $object->fk_user=0; $object->is_for_all=0; }elseif($apply_to=='A'){ diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 2556c2d2084..ed6091e3568 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -167,7 +167,7 @@ if ($object->id) print "\n"; print ''; - print dol_fiche_end(); + dol_fiche_end(); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 4a38ff4096a..1a44efa45ec 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -628,7 +628,7 @@ if ($resql) if (!empty($arrayfields['ava.rowid']['checked'])) { print ''; - print $form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1); + $form->selectAvailabilityDelay($search_availability, 'search_availability', '', 1); print ajax_combobox('search_availability'); print ''; } diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index 8d5afb985a3..6714e25ddeb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -174,7 +174,7 @@ if ($id > 0 || !empty($ref)) print "\n"; - print dol_fiche_end(); + dol_fiche_end(); $modulepart = 'commande'; $permission = $user->rights->commande->creer; diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 15f6a1236d5..0f0c3d11386 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -107,7 +107,7 @@ else { dol_print_error($db); } - if (empty($min)) $min = dol_now - 3600 * 24; + if (empty($min)) $min = dol_now() - 3600 * 24; $log="graph.php: min=".$min." max=".$max; dol_syslog($log); diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 515e5308903..24d49040c13 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -231,7 +231,7 @@ else print ''; - print dol_fiche_end(); + dol_fiche_end(); // Actions buttons diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bbd11c8f522..ef34ab5093f 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7029,7 +7029,7 @@ abstract class CommonObject if ($nbbyrow > 0) { - if ($nbphoto == 1) $return .= ''; + if ($nbphoto == 1) $return .= '
'; if ($nbphoto % $nbbyrow == 1) $return .= ''; $return .= '
'; diff --git a/htdocs/core/class/html.formcron.class.php b/htdocs/core/class/html.formcron.class.php index 0277630ae78..2a2a6c97078 100644 --- a/htdocs/core/class/html.formcron.class.php +++ b/htdocs/core/class/html.formcron.class.php @@ -64,6 +64,7 @@ class FormCron extends Form global $langs; $langs->load('cron@cron'); + $out = ''; if (!empty($readonly)) { if ($selected=='command') { $out= $langs->trans('CronType_command'); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 6556590c076..711249576a1 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1136,7 +1136,8 @@ class EmailCollector extends CommonObject $elements = imap_mime_header_decode($overview[0]->subject); $newstring = ''; if (! empty($elements)) { - for ($i = 0; $i < count($elements); $i++) { + $num = count($elements); + for ($i = 0; $i < $num; $i++) { $newstring .= ($newstring ? ' ' : '').$elements[$i]->text; } $overview[0]->subject = $newstring; diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index c12bd6decf3..e434bc524e2 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -168,7 +168,7 @@ if ($id > 0 || !empty($ref)) { print "\n"; - print dol_fiche_end(); + dol_fiche_end(); $modulepart = 'expedition'; $permission = $user->rights->expedition->creer; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index d25c106bf39..b4c8ab558eb 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2127,7 +2127,7 @@ form#login { border-radius: 4px; border:solid 1px rgba(80,80,80,.4); - border-top:solid 1px f8f8f8; + border-top:solid 1px #f8f8f8; } .login_table input#username, .login_table input#password, .login_table input#securitycode{ border: none; diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index f8a8b9cc9e5..c3f2b198301 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -394,7 +394,7 @@ if (! empty($id) || ! empty($ref)) } } $listofvariantselected .= ''; - //print dol_fiche_end(); + //dol_fiche_end(); } else { $title = $langs->trans('EditProductCombination'); } @@ -602,7 +602,7 @@ if (! empty($id) || ! empty($ref)) print '
'; } - print dol_fiche_end(); + dol_fiche_end(); ?>