Closed (outdated)
Project:
File Log
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2011 at 13:09 UTC
Updated:
18 Dec 2017 at 11:15 UTC
Jump to comment: Most recent
theme_filelog_format function , line 88 references a non-existent date format 'large', should be 'long'
88 if (in_array($f['date_format'], array('small', 'large', 'medium'))) {
89 $entry['timestamp'] = format_date($entry['timestamp'], $f['date_format'], '', NULL, 'en');
90 }
91 else {
92 $entry['timestamp'] = format_date($entry['timestamp'], 'custom', $f['date_format'], NULL, 'en');
93 }
This means that if the date_format key of $f == 'long', it falls through to line 92 which then interprets 'long' as a custom date format with the following effect:
l = 'A full textual representation of the day of the week'
o = Literal o
n = 'Numeric representation of a month, without leading zeros'
g = '12-hour format of an hour without leading zeros'
Therefore on May 12th at 1:55pm, my log entry timestamps say Thursdayo51
Now that I take a closer look, a similar mix up has happened where the code references date format 'small' instead of 'short'.
In order to fix this line 88 needs to change to:
88 if (in_array($f['date_format'], array('short', 'long', 'medium'))) {
Comments
Comment #1
grahamu commentedI have just realised that my bug report above is wrong. The 'small' and 'large' formats are correct, I must have had these confused with something else when I thought they were incorrect.
This issue should be closed.
Comment #2
cburschka