summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--views.module5
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index ba73bfe..6fd8ebd 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -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
diff --git a/views.module b/views.module
index e76e56c..c8b1cb8 100644
--- a/views.module
+++ b/views.module
@@ -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'];