diff --git a/date/date_handler_field_multiple.inc b/date/date_handler_field_multiple.inc
index 570bb8a..b10d779 100644
--- a/date/date_handler_field_multiple.inc
+++ b/date/date_handler_field_multiple.inc
@@ -54,7 +54,7 @@ class date_handler_field_multiple extends content_handler_field_multiple {
     );
   }
 
-  function pre_render($values) {
+  function pre_render(&$values) {
 
     // If there are no values to render (displaying a summary, or query returned no results),
     // or if this is not a grouped field, do nothing specific.
diff --git a/includes/date_api_filter_handler.inc b/includes/date_api_filter_handler.inc
index 7233fe3..b8180af 100644
--- a/includes/date_api_filter_handler.inc
+++ b/includes/date_api_filter_handler.inc
@@ -361,7 +361,7 @@ class date_api_filter_handler extends views_handler_filter_numeric {
    * That's not the normal method, so we have to manually
    * transfer the selected value back to the option.
    */
-  function value_validate(&$form, &$form_state) {
+  function value_validate($form, &$form_state) {
     if (($form_state['values']['options']['operator'] == 'between' || $form_state['values']['options']['operator'] == 'not between') && 
     !empty($form_state['values']['options']['value']['default_date']) && empty($form_state['values']['options']['value']['default_to_date'])) {
       form_error($form['value']['default_to_date'], t('Please set a default value for the To date as well as the From date when using default values with the Between or Not between operators.'));

diff --git a/date_api.module b/date_api.module
index 047b2ce..f3e3312 100644
--- a/date_api.module
+++ b/date_api.module
@@ -863,7 +863,8 @@ function date_make_date($date, $timezone = NULL, $type = DATE_DATETIME, $granula
   }

   // Special handling for partial dates that don't need precision.
-  $max_granularity = array_pop(date_granularity_sorted($granularity));
+  $granularity_sorted = date_granularity_sorted($granularity);
+  $max_granularity = array_pop($granularity_sorted);
   if (in_array($max_granularity, array('year', 'month')) || $type == DATE_ISO || $type == DATE_ARRAY) {
     if ($type == DATE_UNIX) {
       $date = date_convert($date, $type, DATE_DATETIME);
