Browse Source

Fix upload form accidentally setting resolution

spaghetti 7 years ago
parent
commit
1a9b5309e3
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      classes/torrent_form.class.php

+ 2
- 2
classes/torrent_form.class.php View File

@@ -414,11 +414,11 @@ Source: <input type="text" value="<?=Users::get_upload_sources()[0]?>" size="20"
414 414
         <td class="label">Resolution</td>
415 415
         <td>
416 416
           <select id="ressel" name="ressel" onchange="SetResolution()">
417
-            <option>---</option>
417
+            <option value="">---</option>
418 418
 <?
419 419
     foreach($this->Resolutions as $Res) {
420 420
       echo "\t\t\t\t\t\t<option value=\"$Res\"";
421
-      if ($Res == $Torrent['Resolution'] || (!isset($FoundRes) && isset($Torrent['Resolution']) && $Res == "Other")) {
421
+      if ($Res == $Torrent['Resolution'] || (!isset($FoundRes) && ($Torrent['Resolution'] ?? false) && $Res == "Other")) {
422 422
         echo " selected";
423 423
         $FoundRes = true;
424 424
       }

Loading…
Cancel
Save