In a section of the date_api.install, variables are being set for the site, however one line "gets" the value of a variable, but doesn't assign it to anything. Is this line unnecessary, or is it, in fact, supposed to be setting the variable, instead of getting it.

I attached a patch against the current dev release (1.17)

CommentFileSizeAuthor
fix_get_date_api.install.patch571 bytesmichael_kirk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michael_kirk’s picture

forgot to mention:

The variable being get, and not set, is 'date_default_timezone_name'...

variable_get('date_default_timezone_name', NULL);

KarenS’s picture

Status: Needs review » Closed (works as designed)

This is done this way by design. If I use variable_set() the value will be overwritten even if it already exists. Using variable_get will set the value if it doesn't exist but not over-write it if it does. I add some documentation to the code to explain that.