diff --git a/newznab/controllers/Games.php b/newznab/controllers/Games.php index 1a2142129..d2ecf9610 100644 --- a/newznab/controllers/Games.php +++ b/newznab/controllers/Games.php @@ -277,21 +277,21 @@ class Games } $ordersort = (isset($orderArr[1]) && preg_match('/^asc|desc$/i', $orderArr[1])) ? $orderArr[1] : 'desc'; - return array($orderfield, $ordersort); + return [$orderfield, $ordersort]; } public function getGamesOrdering() { - return array( + return [ 'title_asc', 'title_desc', 'posted_asc', 'posted_desc', 'size_asc', 'size_desc', 'files_asc', 'files_desc', 'stats_asc', 'stats_desc', 'releasedate_asc', 'releasedate_desc', 'genre_asc', 'genre_desc' - ); + ]; } public function getBrowseByOptions() { - return array('title' => 'title', 'genre' => 'genre_id', 'year' => 'year'); + return ['title' => 'title', 'genre' => 'genre_id', 'year' => 'year']; } public function getBrowseBy() @@ -737,10 +737,10 @@ class Games { $obj = new \GiantBomb($this->publicKey); try { - $fields = array( + $fields = [ "api_detail_url", "name" - ); - $result = json_decode(json_encode($obj->search($title, $fields, 10, 1, array("game"))), true); + ]; + $result = json_decode(json_encode($obj->search($title, $fields, 10, 1, ["game"])), true); // We hit the maximum request. if (empty($result)) { $this->maxHitRequest = true; @@ -757,7 +757,7 @@ class Games $result = $result['results'][$i]; preg_match('/\/\d+\-(?\d+)\//', $result['api_detail_url'], $matches); $this->_gameID = (string)$matches['asin']; - $result = $this->fetchGiantBomb[]; + $result = $this->fetchGiantBombArray(); $this->_classUsed = "gb"; break; } @@ -782,15 +782,15 @@ class Games * * @return bool|mixed */ - public function fetchGiantBomb[] + public function fetchGiantBombArray() { $obj = new \GiantBomb($this->publicKey); try { - $fields = array( + $fields = [ "deck", "description", "original_game_rating", "api_detail_url", "image", "genres", "name", "publishers", "original_release_date", "reviews", "site_detail_url" - ); + ]; $result = json_decode(json_encode($obj->game($this->_gameID, $fields)), true); $result = $result['results']; } catch (Exception $e) { diff --git a/www/pages/ajax_tvinfo.php b/www/pages/ajax_tvinfo.php index 0179a5a89..7cff911eb 100644 --- a/www/pages/ajax_tvinfo.php +++ b/www/pages/ajax_tvinfo.php @@ -19,7 +19,7 @@ else print "
  • Aired on ".date("F j, Y", strtotime($rel["tvairdate"]))."
  • \n"; print ""; - if ($rel["rageID"] > 0) + if (isset($rel["rageid"]) && $rel["rageid"] > 0) { $t = new TvRage(); $rage = $t->getByRageID($rel["rageid"]); diff --git a/www/templates/charisma/views/frontend/viewmovie.tpl b/www/templates/charisma/views/frontend/viewmovie.tpl index 516b50a0b..8d00e5a3c 100644 --- a/www/templates/charisma/views/frontend/viewmovie.tpl +++ b/www/templates/charisma/views/frontend/viewmovie.tpl @@ -5,7 +5,7 @@ {/if} -{if $movie.backdrop == 1} +{if isset($movie.backdrop) && $movie.backdrop == 1}
    {/if}
    diff --git a/www/templates/charisma/views/frontend/xxx.tpl b/www/templates/charisma/views/frontend/xxx.tpl index 439af58eb..3c2466e77 100644 --- a/www/templates/charisma/views/frontend/xxx.tpl +++ b/www/templates/charisma/views/frontend/xxx.tpl @@ -165,7 +165,7 @@
    {if isset($catsplit[0])} {$catsplit[0]}{/if} {if isset($catsplit[1])} {$catsplit[1]}{/if} - {$result.year} + {if isset($result.year)} {$result.year}}{/if} {$msize[$m@index]|fsize_format:"MB"} Posted {$mpostdate[$m@index]|timeago} @@ -305,7 +305,7 @@
    {if isset($catsplit[0])} {$catsplit[0]}{/if} {if isset($catsplit[1])} {$catsplit[1]}{/if} - {$result.year} + {if isset($result.year)} {$result.year}}{/if} {$msize[$m@index]|fsize_format:"MB"} Posted {$mpostdate[$m@index]|timeago} diff --git a/www/templates/omicron/views/frontend/viewmovie.tpl b/www/templates/omicron/views/frontend/viewmovie.tpl index 516b50a0b..8d00e5a3c 100644 --- a/www/templates/omicron/views/frontend/viewmovie.tpl +++ b/www/templates/omicron/views/frontend/viewmovie.tpl @@ -5,7 +5,7 @@ {/if} -{if $movie.backdrop == 1} +{if isset($movie.backdrop) && $movie.backdrop == 1}
    {/if}
    diff --git a/www/templates/omicron/views/frontend/xxx.tpl b/www/templates/omicron/views/frontend/xxx.tpl index 439af58eb..3c2466e77 100644 --- a/www/templates/omicron/views/frontend/xxx.tpl +++ b/www/templates/omicron/views/frontend/xxx.tpl @@ -165,7 +165,7 @@
    {if isset($catsplit[0])} {$catsplit[0]}{/if} {if isset($catsplit[1])} {$catsplit[1]}{/if} - {$result.year} + {if isset($result.year)} {$result.year}}{/if} {$msize[$m@index]|fsize_format:"MB"} Posted {$mpostdate[$m@index]|timeago} @@ -305,7 +305,7 @@
    {if isset($catsplit[0])} {$catsplit[0]}{/if} {if isset($catsplit[1])} {$catsplit[1]}{/if} - {$result.year} + {if isset($result.year)} {$result.year}}{/if} {$msize[$m@index]|fsize_format:"MB"} Posted {$mpostdate[$m@index]|timeago}