diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 3693719f1595..ba88daf7b417 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1663,8 +1663,13 @@ function drupal_get_schema($table = NULL, $rebuild = FALSE) { */ function drupal_function_exists($function) { static $checked = array(); + static $maintenance; - if (defined('MAINTENANCE_MODE')) { + if (!isset($maintenance)) { + $maintenance = defined('MAINTENANCE_MODE'); + } + + if ($maintenance) { return function_exists($function); }