I get an error with tracked urls in mailings. When the user clicks the link inside the mail, he gets a page telling him "error 500".
If error reporting is on in php, I get following error:
Fatal error: Call to undefined function drupal_add_http_header() in /home/www/<...>/sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 790
The URL called is
http://<mydomain>/sites/all/modules/civicrm/extern/url.php?u=221&qid=1851
As workaround, I could solve the problem adding a call to loadBootStrap():
public function setHttpHeader($name, $value) {
self::loadBootStrap([], false);
drupal_add_http_header($name, $value);
}
But I belive this a very dirty thing to do! :-/
With this fix, all things works fine with the same url from above!
I'm using CiviCRM 4.7.Beta3 and Drupal core 7.41.