Commit 28d72681 authored by merlinofchaos's avatar merlinofchaos

#122063: Prevent strtotime from choking on empty timestamps

parent 8e136a0b
......@@ -117,6 +117,7 @@ Views 4.7.x-dev
o #118069: Move the query cache into the real cache. This should clear up a few caching problems.
o #122818: Incorrect use of fullname when queryname should have been used
o #108523: Properly validate that filter values need values selected.
o #122063: Prevent strtotime from choking on empty timestamps
New features:
o #105620: (Attempt 2) allow modules to alter views tables + arguments
......
......@@ -2043,7 +2043,10 @@ function views_handler_field_filesize($fieldinfo, $fielddata, $value, $data) {
* Handle a timestamp filter.
*/
function views_handler_filter_timestamp($op, $filter, $filterinfo, &$query) {
$value = $filter['value'] == 'now' ? "***CURRENT_TIME***" : strtotime($filter['value']);
$value = 0;
if ($filter['value']) {
$value = $filter['value'] == 'now' ? "***CURRENT_TIME***" : strtotime($filter['value']);
}
$table = $filterinfo['table'];
$column = $filterinfo['field'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment