function drupal_register_shutdown_function

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)
cle7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)
elmsmedia7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)
icor7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)
meedjum_blog7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)
mooc7 bootstrap.inc &drupal_register_shutdown_function($callback = NULL)

Registers a function for execution on shutdown.

Wrapper for register_shutdown_function() that catches thrown exceptions to avoid "Exception thrown without a stack frame in Unknown".

Parameters

$callback: The shutdown function to register.

...: Additional arguments to pass to the shutdown function.

Return value

Array of shutdown functions to be executed.

See also

register_shutdown_function()

Related topics

15 calls to drupal_register_shutdown_function()
devel_boot in sites/all/modules/ulmus/devel/devel.module
Implementation of hook_boot(). Runs even for cached pages.
devel_shutdown in sites/all/modules/ulmus/devel/devel.module
Runs on shutdown to clean up and display developer information.
DrupalWebTestCase::prepareEnvironment in modules/simpletest/drupal_web_test_case.php
Prepares the current environment for running the test.
DrupalWebTestCase::tearDown in modules/simpletest/drupal_web_test_case.php
Delete created files and temporary files directory, delete the tables created by setUp(), and reset the database prefix.
drupal_cron_run in includes/common.inc
Executes a cron run when called.

... See full list

File

includes/bootstrap.inc, line 3417
Functions that need to be loaded on every Drupal request.

Code

function &drupal_register_shutdown_function($callback = NULL) {
  // We cannot use drupal_static() here because the static cache is reset during
  // batch processing, which breaks batch handling.
  static $callbacks = array();

  if (isset($callback)) {
    // Only register the internal shutdown function once.
    if (empty($callbacks)) {
      register_shutdown_function('_drupal_shutdown_function');
    }
    $args = func_get_args();
    array_shift($args);
    // Save callback and arguments
    $callbacks[] = array(
      'callback' => $callback,
      'arguments' => $args,
    );
  }
  return $callbacks;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.