summaryrefslogtreecommitdiffstats
path: root/application/forms/TimeRangePicker
diff options
context:
space:
mode:
Diffstat (limited to 'application/forms/TimeRangePicker')
-rw-r--r--application/forms/TimeRangePicker/CommonForm.php2
-rw-r--r--application/forms/TimeRangePicker/CustomForm.php7
2 files changed, 6 insertions, 3 deletions
diff --git a/application/forms/TimeRangePicker/CommonForm.php b/application/forms/TimeRangePicker/CommonForm.php
index 21e2096..af0944a 100644
--- a/application/forms/TimeRangePicker/CommonForm.php
+++ b/application/forms/TimeRangePicker/CommonForm.php
@@ -165,7 +165,7 @@ class CommonForm extends Form
unset($options['']);
foreach ($options as $option => $_) {
- if ($seconds === $option * $factor) {
+ if ($seconds === (int) $option * $factor) {
$element->setValue((string) $option);
return;
}
diff --git a/application/forms/TimeRangePicker/CustomForm.php b/application/forms/TimeRangePicker/CustomForm.php
index 89b5833..7b37022 100644
--- a/application/forms/TimeRangePicker/CustomForm.php
+++ b/application/forms/TimeRangePicker/CustomForm.php
@@ -100,8 +100,8 @@ class CustomForm extends Form
if ($start > $end) {
$absoluteRangeParameters = TimeRangePickerTools::getAbsoluteRangeParameters();
$this->getRedirectUrl()->getParams()
- ->set($absoluteRangeParameters['start'], $end)
- ->set($absoluteRangeParameters['end'], $start);
+ ->set($absoluteRangeParameters['start'], (string) $end)
+ ->set($absoluteRangeParameters['end'], (string) $start);
}
$this->getRedirectUrl()->remove(TimeRangePickerTools::getRelativeRangeParameter());
@@ -126,6 +126,9 @@ class CustomForm extends Form
]);
}
+ assert(isset($elementDecorators), '$elementDecorators not initialized in the loop');
+ assert(isset($element), '$element not initialized in the loop');
+
$decorators = [];
foreach ($elementDecorators as $key => $decorator) {
if ($key === 'Zend_Form_Decorator_ViewHelper') {