Fixed generating empty difference snapshots

This commit is contained in:
Marcin Kurczewski 2014-11-11 15:21:45 +01:00
parent 2f12ec0a5e
commit 40d1276c36

View file

@ -43,11 +43,10 @@ class HistoryService
if ($otherSnapshots)
{
$lastSnapshot = array_shift($otherSnapshots);
if (md5(json_encode($lastSnapshot->getData())) === md5(json_encode($snapshot->getData())))
return $lastSnapshot;
$dataDifference = $this->getSnapshotDataDifference($snapshot->getData(), $lastSnapshot->getData());
$snapshot->setDataDifference($dataDifference);
if (empty($dataDifference['+']) && empty($dataDifference['-']))
return $lastSnapshot;
}
else
{