Why there is execution of full bootstrap?

function statistics_advanced_boot() {
  global $user;

  // Load path handling.
  drupal_bootstrap(DRUPAL_BOOTSTRAP_PATH);

It causing sometimes following errors:

array
  'type' => int 8
  'message' => string 'A session had already been started - ignoring session_start()' (length=61)
  'file' => string 'includes\bootstrap.inc' (length=65)
  'line' => int 1029

It's really necessary?

Comments

dave reid’s picture

Status: Active » Closed (works as designed)

It's not a full bootstrap (DRUPAL_BOOTSTRAP_FULL), but statistics_advanced needs to know the current normalized 'path' via $_GET['q']. That can be only done in a path bootstrap. If you have suggestions on how to fix this without changing the functionality of the module, please let me know.

kenorb’s picture

Why you can't use $_GET['q']?
Or following code:

    if (module_exists('path')) { // if path module exist, translate url from alias
	$path = drupal_get_path_alias($_GET['q']);
    } else {
	$path = $_GET['q']; // otherwise use standard one
    }

to receive path, if I understand correctly.