Hi,
I just discovered a small bug in date_api_argument_handler.inc that generates an ugly error message when using CCK date fields to create summary lists with Views:
Fatal error: Call to a member function arg_range() on a non-object in /var/www/wop/sites/all/modules/date/includes/date_api_argument_handler.inc on line 131
A patch is attached below. The patch works on Drupal 6.4 with Date 6.x-2.0-rc4 and Views 6.x-2.0.
Regards and thanks for the hard work,
Alexander
--- date/includes/date_api_argument_handler.inc 2008-10-15 16:48:45.000000000 +0200
+++ date_api_argument_handler.inc 2008-10-20 01:12:27.000000000 +0200
@@ -128,7 +128,7 @@
function summary_name($data) {
$format = $this->date_handler->views_formats($this->options['granularity'], 'display');
$value = $data->{$this->name_alias};
- $range = $date_handler->arg_range($value);
+ $range = $this->date_handler->arg_range($value);
return date_format_date($range[0], 'custom', $format);
}
Comments
Comment #1
mike_r1977 commentedThank you for sharing this patch. It helps with the problem related here.
Comment #2
karens commentedThis was fixed somewhere along the line.