I observed on a customer server that the ga_push_method_analytics_js() function fails because of $_SESSION['ga_push_' . GA_PUSH_METHOD_ANALYTICS_JS] not being initialized before appending the push data.

This line fails: $_SESSION['ga_push_' . GA_PUSH_METHOD_ANALYTICS_JS][] = $push_info;, in that case.

Find attached the PHPInfo() of the server.
Also find in the first comment a proposed patch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bpresles created an issue. See original summary.

bpresles’s picture

tunic’s picture

Status: Active » Needs review

Thanks for the patch!

GeduR’s picture

Status: Needs review » Reviewed & tested by the community

The patch looks nice, some changes has been done and also applied to ga_js method. Thanks!

GeduR’s picture

Title: ga_push_method_analytics_js fails with some PHP version / settings » JS methods: $_SESSION is not been initialized

  • GeduR committed 0f6c093 on 7.x-1.x authored by bpresles
    Issue #2796435 by bpresles, GeduR: JS methods: $_SESSION is not been...
GeduR’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.