Ver código fonte

Fix minor regressions

Jordi Boggiano 6 anos atrás
pai
commit
dfa8e28821

+ 1 - 1
src/Packagist/WebBundle/Entity/DownloadRepository.php

@@ -10,6 +10,6 @@ class DownloadRepository extends EntityRepository
     {
         $conn = $this->getEntityManager()->getConnection();
 
-        $conn->executeUpdate('DELETE FROM download WHERE package_id = :id', ['package_id' => $package->getId()]);
+        $conn->executeUpdate('DELETE FROM download WHERE package_id = :id', ['id' => $package->getId()]);
     }
 }

+ 1 - 1
src/Packagist/WebBundle/Model/DownloadManager.php

@@ -82,7 +82,7 @@ class DownloadManager
             $date->modify('-1 day');
         }
 
-        $total = $redisData[2];
+        $total = (int) $redisData[2];
 
         // how much of yesterday to add to today to make it a whole day (sort of..)
         $dayRatio = (2400 - (int) date('Hi')) / 2400;