Browse Source

Fix PHP warnings

Sunny 2 years ago
parent
commit
44b1860149
1 changed files with 2 additions and 2 deletions
  1. 2 2
      search.php

+ 2 - 2
search.php

@@ -20,7 +20,7 @@
   echo "<div class=results>";
 
   foreach ($results as $result) {
-    $link = $result->item_url_path ?: $result->item_url_root;
+    $link = $result->item_url_path ?? $result->item_url_root;
 
     switch ($result->type) {
       case "b":
@@ -61,7 +61,7 @@
         echo "<small>";
         echo "by " . htmlspecialchars($result->band_name);
         echo "<br>";
-        echo "on " . htmlspecialchars($result->album_name ?: $result->name);
+        echo "on " . htmlspecialchars($result->album_name ?? $result->name);
         echo "</small>";
         break;
     };