Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 4b92c51

Browse files
author
Julien Jomier
committed
STYLE: Fixed style
1 parent b96b4ad commit 4b92c51

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/controllers/components/MIDAS2MigrationComponent.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ private function _createFolderForItem($collectionId, $parentFolderid)
149149
// Get the number of downloads and set it
150150
$itemstatsquery = pg_query("SELECT downloads from midas_resourcelog WHERE
151151
resource_id_type=".MIDAS2_RESOURCE_ITEM." AND resource_id=".$item_id);
152-
if($itemstats_array = pg_fetch_array($itemstatsquery))
152+
$itemstats_array = pg_fetch_array($itemstatsquery);
153+
if($itemstats_array)
153154
{
154155
$itemdao->setView($itemstats_array['downloads']);
155156
$itemdao->setDownload($itemstats_array['downloads']);

0 commit comments

Comments
 (0)