From 2c381622a5bd3ab5b22077348a088bb54ca202dc Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 31 Jan 2009 16:50:57 +0000 Subject: #88264 by Rob Loach and kscheirer: Make variable_get()'s defaultparameter default to NULL so that NULLs do not need to be specified. --- includes/bootstrap.inc | 4 ++-- includes/file.inc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'includes') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index ba27a5f7c..a84257341 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -631,7 +631,7 @@ function variable_init($conf = array()) { * @return * The value of the variable. */ -function variable_get($name, $default) { +function variable_get($name, $default = NULL) { global $conf; return isset($conf[$name]) ? $conf[$name] : $default; @@ -1046,7 +1046,7 @@ function drupal_is_denied($ip) { // Because this function is called on every page request, we first check // for an array of IP addresses in settings.php before querying the // database. - $blocked_ips = variable_get('blocked_ips', NULL); + $blocked_ips = variable_get('blocked_ips'); if (isset($blocked_ips) && is_array($blocked_ips)) { return in_array($ip, $blocked_ips); } diff --git a/includes/file.inc b/includes/file.inc index 38c4999ff..05318add6 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -1407,7 +1407,7 @@ function file_scan_directory($dir, $mask, $nomask = '/(\.\.?|CVS)$/', $callback * A string containing a temp directory. */ function file_directory_temp() { - $temporary_directory = variable_get('file_directory_temp', NULL); + $temporary_directory = variable_get('file_directory_temp'); if (is_null($temporary_directory)) { $directories = array(); -- cgit v1.2.3