Browse Source

Prevent some errors on batch tag tool use

spaghetti 8 years ago
parent
commit
d345a95162
1 changed files with 5 additions and 8 deletions
  1. 5
    8
      sections/tools/misc/tags.php

+ 5
- 8
sections/tools/misc/tags.php View File

262
           Torrents::update_hash($GroupID);
262
           Torrents::update_hash($GroupID);
263
         }
263
         }
264
       }
264
       }
265
-
266
-    } // if ($Mode == MODE_MERGE)
265
+    }
267
 
266
 
268
     echo "\n".'<div class="box pad center"><strong>Success!</strong> Affected entries: '.number_format($TotalAffected).'</div>';
267
     echo "\n".'<div class="box pad center"><strong>Success!</strong> Affected entries: '.number_format($TotalAffected).'</div>';
269
 
268
 
277
       </td>
276
       </td>
278
     </tr>
277
     </tr>
279
 <?
278
 <?
280
-      if (count($AffectedTorrents)) {
279
+      if (count($AffectedTorrents ?? [])) {
281
         foreach ($AffectedTorrents as $Row) {
280
         foreach ($AffectedTorrents as $Row) {
282
           echo "\n\t\t<tr><td>$Row</td></tr>";
281
           echo "\n\t\t<tr><td>$Row</td></tr>";
283
         }
282
         }
289
       </td>
288
       </td>
290
     </tr>
289
     </tr>
291
 <?
290
 <?
292
-      if (count($AffectedRequests)) {
291
+      if (count($AffectedRequests ?? [])) {
293
         foreach ($AffectedRequests as $Row) {
292
         foreach ($AffectedRequests as $Row) {
294
           echo "\n\t\t<tr><td>$Row</td></tr>";
293
           echo "\n\t\t<tr><td>$Row</td></tr>";
295
         }
294
         }
298
   </table>
297
   </table>
299
 <?
298
 <?
300
     }
299
     }
301
-
302
-  } // if (!$Err)
303
-
304
-} // if ( isset($_GET['tag']) || isset($_GET['replace']) )
300
+  }
301
+}
305
 
302
 
306
 echo '</div>';
303
 echo '</div>';
307
 
304
 

Loading…
Cancel
Save