Using PHP version 5.6.
For notices I have updated line no. 176 with isset condition.
if (isset($variables['element']['#formatter']) && $variables['element']['#formatter'] == 'date_default') {
I was not getting the value of the date.
line no. 193
$date = format_date(strtotime($variables['element']['#object']->$field_name['und'][0]['value']), 'custom', 'm/d/Y g:ia');
When I updated the code.
$date = format_date(strtotime($variables['element']['#object']->{$field_name}['und'][0]['value']), 'custom', 'm/d/Y g:ia');
It worked perfectly.
Again, I placed token inside the formatter for date field but they were not getting replaced. When I updated the the line no. 215 it worked fine.
$class_value = token_replace($settings[$value]['tokenized'], array('node' => $variables['element']['#object']));
Comments
Comment #2
pradeep22saini commentedUpdating the patch for issue faced and resolved.
Comment #3
scuba_flyI did a code review. Patch makes sense and code looks good. Thanks!
I did not try to apply the patch.
Since 7.x-2.0 is being developed, maybe anyone could try and see if this patch applies there?