diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/dashboard/dashboard.module | 6 | ||||
-rw-r--r-- | modules/image/image.module | 6 | ||||
-rw-r--r-- | modules/openid/openid.inc | 10 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 2 | ||||
-rw-r--r-- | modules/system/system.api.php | 5 | ||||
-rw-r--r-- | modules/system/system.module | 2 | ||||
-rw-r--r-- | modules/upload/upload.module | 2 |
7 files changed, 12 insertions, 21 deletions
diff --git a/modules/dashboard/dashboard.module b/modules/dashboard/dashboard.module index bc903d676..6db5e21c8 100644 --- a/modules/dashboard/dashboard.module +++ b/modules/dashboard/dashboard.module @@ -242,7 +242,7 @@ function dashboard_show_disabled() { // Theme the output and end the page request. print theme('dashboard_disabled_blocks', array('blocks' => $blocks)); - exit(); + drupal_exit(); } /** @@ -270,7 +270,7 @@ function dashboard_show_block_content($module, $delta) { $build = _block_get_renderable_array($block_content); $rendered_block = drupal_render($build); print $rendered_block; - exit; + drupal_exit(); } /** @@ -318,7 +318,7 @@ function dashboard_update() { } } } - exit; + drupal_exit(); } /** diff --git a/modules/image/image.module b/modules/image/image.module index f745662d3..e41edc642 100644 --- a/modules/image/image.module +++ b/modules/image/image.module @@ -484,7 +484,7 @@ function image_style_generate() { // image_style_url(). if (!$style || !cache_get('access:' . $style_name . ':' . $path_md5, 'cache_image')) { drupal_access_denied(); - exit(); + drupal_exit(); } // Don't start generating the image if the derivate already exists or if @@ -498,7 +498,7 @@ function image_style_generate() { drupal_add_http_header('503 Service Unavailable'); drupal_add_http_header('Retry-After', 3); print t('Image generation in progress, please try again shortly.'); - exit(); + drupal_exit(); } } @@ -518,7 +518,7 @@ function image_style_generate() { watchdog('image', 'Unable to generate the derived image located at %path.', $destination); drupal_add_http_header('500 Internal Server Error'); print t('Error generating image.'); - exit(); + drupal_exit(); } } diff --git a/modules/openid/openid.inc b/modules/openid/openid.inc index bb90596a5..ef923c97e 100644 --- a/modules/openid/openid.inc +++ b/modules/openid/openid.inc @@ -62,10 +62,7 @@ function openid_redirect_http($url, $message) { $sep = (strpos($url, '?') === FALSE) ? '?' : '&'; header('Location: ' . $url . $sep . implode('&', $query), TRUE, 302); - // Commit session data before redirecting. - drupal_session_commit(); - - exit; + drupal_exit(); } /** @@ -78,10 +75,7 @@ function openid_redirect($url, $message) { $output .= "</body></html>\n"; print $output; - // Commit session data before redirecting. - drupal_session_commit(); - - exit; + drupal_exit(); } function openid_redirect_form($form, &$form_state, $url, $message) { diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index e21c114ae..190128b4a 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1922,7 +1922,7 @@ function system_run_cron() { */ function system_php() { phpinfo(); - exit(); + drupal_exit(); } /** diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 2826cdbc6..1c5094704 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -259,7 +259,7 @@ function hook_element_info_alter(&$type) { * Perform cleanup tasks. * * This hook is run at the end of each page request. It is often used for - * page logging and printing out debugging information. + * page logging and specialized cleanup. This hook MUST NOT print anything. * * Only use this hook if your code must run even for cached page views. * If you have code which must run once on all non cached pages, use @@ -271,9 +271,6 @@ function hook_element_info_alter(&$type) { * @param $destination * If this hook is invoked as part of a drupal_goto() call, then this argument * will be a fully-qualified URL that is the destination of the redirect. - * Modules may use this to react appropriately; for example, nothing should - * be output in this case, because PHP will then throw a "headers cannot be - * modified" error when attempting the redirection. */ function hook_exit($destination = NULL) { db_update('counter') diff --git a/modules/system/system.module b/modules/system/system.module index 0e932863d..996894419 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -2888,7 +2888,7 @@ function system_run_cron_image() { } } - exit; + drupal_exit(); } /** diff --git a/modules/upload/upload.module b/modules/upload/upload.module index 51328d97c..391d064b3 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -649,7 +649,7 @@ function upload_js() { form_set_error('form_token', t('Validation error, please try again. If this error persists, please contact the site administrator.')); $output = theme('status_messages'); print drupal_json_encode(array('status' => TRUE, 'data' => $output)); - exit(); + drupal_exit(); } $form_state = array('values' => $_POST); |