[Scummvm-git-logs] scummvm-web master -> ac98bb341e49b32b4ca30c0d8e38600f22b7bb92

Thunderforge noreply at scummvm.org
Mon Nov 22 01:44:34 UTC 2021


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm-web' repo located at https://github.com/scummvm/scummvm-web .

Summary:
ac98bb341e WEB: Fixing when there is no download link for the user agent (#181)


Commit: ac98bb341e49b32b4ca30c0d8e38600f22b7bb92
    https://github.com/scummvm/scummvm-web/commit/ac98bb341e49b32b4ca30c0d8e38600f22b7bb92
Author: Thunderforge (wjherrmann at gmail.com)
Date: 2021-11-21T19:44:32-06:00

Commit Message:
WEB: Fixing when there is no download link for the user agent (#181)

Changed paths:
    include/Models/DownloadsModel.php


diff --git a/include/Models/DownloadsModel.php b/include/Models/DownloadsModel.php
index b0f48d49..9e818f30 100644
--- a/include/Models/DownloadsModel.php
+++ b/include/Models/DownloadsModel.php
@@ -107,7 +107,8 @@ class DownloadsModel extends BasicModel
             ->setIgnoreCase(true)
             ->findByUserAgent($os['name']);
 
-        if (!empty($downloads)) {
+        // If we found a user agent for this platform, then generate a download link
+        if (!empty($downloads) && !is_null($downloads[0])) {
             $download = $downloads[0];
 
             $name = strip_tags($download->getName());




More information about the Scummvm-git-logs mailing list