Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik_Tracker.disconnectDatabase should set self::$db to null #862

Closed
anonymous-matomo-user opened this issue Jul 10, 2009 · 1 comment
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

See Tracker.php

The code in Piwik_Tracker.connectDatabase checks to see if self::$db is null and if not returns it.

The code in Piwik_Tracker.disconnectDatabase calls self::$db->disconnect();
but does not set the $db to null. The code should read like so:
public static function disconnectDatabase()
{
if(isset(self::$db))
{
self::$db->disconnect();
// XXX must set $db to null or
// Piwik_Tracker.connectDatabase
// returns unconnected db
self::$db = null;
}
}

We are reading from logs so reuse visits.

@robocoder
Copy link
Contributor

(In [1304]) fixes #862 - Piwik_Tracker.disconnectDatabase should set self::$db to null; patch from ckoulman

@anonymous-matomo-user anonymous-matomo-user added this to the Piwik 0.4.2 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants