issue69, fixed calendar matrix always starting with the current time
[phpfspot.git] / rpc.php
diff --git a/rpc.php b/rpc.php
index 4ffae5f5fbddd3cc58884f25c3136e8abcd809e2..d0a6c1c9e088ea68c96153a30705fee9af1371a8 100644 (file)
--- a/rpc.php
+++ b/rpc.php
@@ -107,9 +107,9 @@ class PHPFSPOT_RPC {
             break;
 
          case 'get_calendar_matrix':
-            if((is_numeric($_GET['year']) || $_GET['year'] == "") &&
-               (is_numeric($_GET['month']) || $_GET['month'] == "") &&
-               (is_numeric($_GET['day']) || $_GET['month'] == "")) {
+            if((is_numeric($_GET['year']) || !isset($_GET['year'])) &&
+               (is_numeric($_GET['month']) || !isset($_GET['month'])) &&
+               (is_numeric($_GET['day']) || !isset($_GET['day']))) {
                $fspot->get_calendar_matrix($_GET['year'], $_GET['month'], $_GET['day']);
             }
             break;