diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 24b3a5c2bbf..e1e1fc45228 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5930,24 +5930,29 @@ class Form
*
* @param string $prefix Prefix
* @param string $selected Selected duration type
- * @param array|null $ecludetypes Array of duration types to exclude. Example array('y', 'm')
+ * @param array $excludetypes Array of duration types to exclude. Example array('y', 'm')
* @return string HTML select string
*/
- public function selectTypeDuration($prefix, $selected = 'i', $excludtypes = null)
+ public function selectTypeDuration($prefix, $selected = 'i', $excludetypes = array())
{
global $langs;
- $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes'));
+ $TDurationTypes = array(
+ 'y'=>$langs->trans('Years'),
+ 'm'=>$langs->trans('Month'),
+ 'w'=>$langs->trans('Weeks'),
+ 'd'=>$langs->trans('Days'),
+ 'h'=>$langs->trans('Hours'),
+ 'i'=>$langs->trans('Minutes')
+ );
// Removed undesired duration types
- if (is_array($excludtypes)) {
- foreach($excludtypes as $value) {
- unset($TDurationTypes[$value]);
- }
+ foreach ($excludetypes as $value) {
+ unset($TDurationTypes[$value]);
}
$retstring = '