Skip to content
Extraits de code Groupes Projets
Valider 89f58bae rédigé par mattpiwik's avatar mattpiwik
Parcourir les fichiers

BIG Kuddos to Julien for spotting this bug and suggesting the solution... I'm...

BIG Kuddos to Julien for spotting this bug and suggesting the solution... I'm thinking this could have easily slipped by!  

git-svn-id: http://dev.piwik.org/svn/trunk@6646 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent d91c4732
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -84,7 +84,20 @@ class Piwik_DataTable_Row ...@@ -84,7 +84,20 @@ class Piwik_DataTable_Row
&& $row[self::DATATABLE_ASSOCIATED] instanceof Piwik_DataTable) && $row[self::DATATABLE_ASSOCIATED] instanceof Piwik_DataTable)
{ {
$this->setSubtable($row[self::DATATABLE_ASSOCIATED]); $this->setSubtable($row[self::DATATABLE_ASSOCIATED]);
} }
}
/**
* Because $this->c[self::DATATABLE_ASSOCIATED] is negative when the table is in memory,
* we must prior to serialize() call, make sure the ID is saved as positive integer
*/
public function __sleep()
{
if(!empty($this->c[self::DATATABLE_ASSOCIATED]) && $this->c[self::DATATABLE_ASSOCIATED] < 0)
{
$this->c[self::DATATABLE_ASSOCIATED] = abs($this->c[self::DATATABLE_ASSOCIATED]);
}
return array('c');
} }
/** /**
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter