Install file test for date_format_ical looks wrong

Created on 8 October 2015, about 9 years ago
Updated 12 May 2023, over 1 year ago

The install function checks for the date_format_ical time format, but the equality check is in the wrong place:

function views_ical_install() {
  if (variable_get('date_format_ical', '-1' == '-1')) {
    variable_set('date_format_ical', 'Ymd\THi\0\0\Z');
  }
}

but presumably it should be:

function views_ical_install() {
  if (variable_get('date_format_ical', '-1') == '-1') {
    variable_set('date_format_ical', 'Ymd\THi\0\0\Z');
  }
}

i.e. with the check for equality to -1 with the returned value from variable_get. At the moment it will always be true.

πŸ› Bug report
Status

Closed: outdated

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom alpirrie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024