You are here

function _authcache_p13n_get_goto_caller in Authenticated User Page Caching (Authcache) 7.2

Utility function: return backtrace frame of the function calling drupal_goto.

Related topics

1 call to _authcache_p13n_get_goto_caller()
authcache_p13n_exit in modules/authcache_p13n/authcache_p13n.module
Implements hook_exit().

File

modules/authcache_p13n/authcache_p13n.module, line 602
Provides methods for serving personalized content fragments.

Code

function _authcache_p13n_get_goto_caller($backtrace, $ignore_additional = array()) {

  // Examine the stack.
  $ignore_functions = array_merge($ignore_additional, array(
    'call_user_func_array',
    'module_invoke_all',
    'drupal_exit',
    'drupal_goto',
  ));
  foreach ($backtrace as $frame) {
    if (!in_array($frame['function'], $ignore_functions)) {
      return $frame;
    }
  }
}