Revision 27e02aed
Added by Assos Assos over 4 years ago
drupal7/includes/bootstrap.inc | ||
---|---|---|
8 | 8 |
/** |
9 | 9 |
* The current system version. |
10 | 10 |
*/ |
11 |
define('VERSION', '7.67');
|
|
11 |
define('VERSION', '7.69');
|
|
12 | 12 |
|
13 | 13 |
/** |
14 | 14 |
* Core API compatibility. |
... | ... | |
1998 | 1998 |
|
1999 | 1999 |
// It is possible that the error handling will itself trigger an error. In that case, we could |
2000 | 2000 |
// end up in an infinite loop. To avoid that, we implement a simple static semaphore. |
2001 |
if (!$in_error_state && function_exists('module_implements')) {
|
|
2001 |
if (!$in_error_state && function_exists('module_invoke_all')) {
|
|
2002 | 2002 |
$in_error_state = TRUE; |
2003 | 2003 |
|
2004 | 2004 |
// The user object may not exist in all conditions, so 0 is substituted if needed. |
... | ... | |
2021 | 2021 |
); |
2022 | 2022 |
|
2023 | 2023 |
// Call the logging hooks to log/process the message |
2024 |
foreach (module_implements('watchdog') as $module) { |
|
2025 |
module_invoke($module, 'watchdog', $log_entry); |
|
2026 |
} |
|
2024 |
module_invoke_all('watchdog', $log_entry); |
|
2027 | 2025 |
|
2028 | 2026 |
// It is critical that the semaphore is only cleared here, in the parent |
2029 | 2027 |
// watchdog() call (not outside the loop), to prevent recursive execution. |
... | ... | |
2518 | 2516 |
|
2519 | 2517 |
switch ($current_phase) { |
2520 | 2518 |
case DRUPAL_BOOTSTRAP_CONFIGURATION: |
2519 |
require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc'; |
|
2521 | 2520 |
_drupal_bootstrap_configuration(); |
2522 | 2521 |
break; |
2523 | 2522 |
|
... | ... | |
2622 | 2621 |
_drupal_log_error(_drupal_decode_exception($exception), TRUE); |
2623 | 2622 |
} |
2624 | 2623 |
catch (Exception $exception2) { |
2624 |
// Add a 500 status code in case an exception was thrown before the 500 |
|
2625 |
// status could be set (e.g. while loading a maintenance theme from cache). |
|
2626 |
drupal_add_http_header('Status', '500 Internal Server Error'); |
|
2627 |
|
|
2625 | 2628 |
// Another uncaught exception was thrown while handling the first one. |
2626 | 2629 |
// If we are displaying errors, then do so with no possibility of a further uncaught exception being thrown. |
2627 | 2630 |
if (error_displayable()) { |
... | ... | |
2647 | 2650 |
drupal_settings_initialize(); |
2648 | 2651 |
|
2649 | 2652 |
// Sanitize unsafe keys from the request. |
2650 |
require_once DRUPAL_ROOT . '/includes/request-sanitizer.inc'; |
|
2651 | 2653 |
DrupalRequestSanitizer::sanitize(); |
2652 | 2654 |
} |
2653 | 2655 |
|
Also available in: Unified diff
-a