Add check for empty values for season and episode in api page

This commit is contained in:
DariusIII
2016-07-13 09:26:22 +02:00
parent a98126a794
commit 4ee10d858f
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -1,3 +1,5 @@
2016-07-13 DariusIII
* Chg: Add check for empty values for season and episode in api page
2016-07-12 DariusIII
* Fix: Wrong usage of result.guid in Gentele theme viewmoviefull page
* Fix: Prevent undefined index notices in XML_Response
+1 -1
View File
@@ -2,7 +2,7 @@
<nntmux>
<versions>
<git>
<tag>0.0.0</tag>
<tag>v0.4.2</tag>
<!-- commit count removed -->
<hooks>
<precommit>9</precommit>
+1 -1
View File
@@ -156,7 +156,7 @@ switch ($function) {
];
// Process season only queries or Season and Episode/Airdate queries
if (isset($_GET['season']) || (isset($_GET['season']) && isset($_GET['ep']))) {
if (!empty($_GET['season']) || (!empty($_GET['season']) && !empty($_GET['ep']))) {
if (preg_match('#^(19|20)\d{2}$#', $_GET['season'], $year) && stripos($_GET['ep'], '/') !== false) {
$airdate = str_replace('/', '-', $year[0] . '-' . $_GET['ep']);
} else {