1. in /projects/php/project1/vendor/kartik-v/yii2-date-range/DateRangePicker.php at line 480
471472473474475476477478479480481482483484485486487488489
/**
* Generates and returns the client script on date range change, when the start and end attributes are set
*
* @param string $type whether `start` or `end`
*
* @return string
*/
protected function getRangeJs($type = '')
{
if (empty($this->getRangeAttr($type))) {
return '';
}
$options = $this->getInputOpts($type);
$input = "jQuery('#" . $this->options['id'] . "')";
return "var v={$input}.val() ? {$type}.format('{$this->_format}') : '';jQuery('#" . $options['id'] .
"').val(v).trigger('change');";
}
/**
The problem due to the fact that since php 5.5, function is invalid value for empty() function:
Note:
Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.
After last update I've got an error:
The problem due to the fact that since php 5.5, function is invalid value for empty() function:
Please change getRangeJs() in DateRangePicker.php
From:
To: