From f27cbd61848858f866cef472aafdfd28aaa8c3b2 Mon Sep 17 00:00:00 2001 From: Georgios Papadakis Date: Tue, 6 Mar 2018 00:55:49 +0200 Subject: [PATCH] Update calendar.php --- libraries/joomla/form/fields/calendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/joomla/form/fields/calendar.php b/libraries/joomla/form/fields/calendar.php index 198714349ef6a..3bc372ff9e001 100644 --- a/libraries/joomla/form/fields/calendar.php +++ b/libraries/joomla/form/fields/calendar.php @@ -169,8 +169,8 @@ public function setup(SimpleXMLElement $element, $value, $group = null) $this->filltable = (string) $this->element['filltable'] ? (string) $this->element['filltable'] : 'true'; $this->timeformat = (int) $this->element['timeformat'] ? (int) $this->element['timeformat'] : 24; $this->singleheader = (string) $this->element['singleheader'] ? (string) $this->element['singleheader'] : 'false'; - $this->minyear = (string) $this->element['minyear'] ? (string) $this->element['minyear'] : null; - $this->maxyear = (string) $this->element['maxyear'] ? (string) $this->element['maxyear'] : null; + $this->minyear = strlen((string) $this->element['minyear']) ? (string) $this->element['minyear'] : null; + $this->maxyear = strlen((string) $this->element['maxyear']) ? (string) $this->element['maxyear'] : null; if ($this->maxyear < 0 || $this->minyear > 0) {