]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
fix E_NOTICE in rss when calling i.e. http://bm.bogo/rss.php/test?sort=date_desc
authorChristian Weiske <cweiske@cweiske.de>
Thu, 7 Apr 2011 17:04:32 +0000 (19:04 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 7 Apr 2011 17:04:32 +0000 (19:04 +0200)
www/rss.php

index 298d9bacdbc7796457e49fea380ef8374a87bb59..50240e563df9de8da8224a88b3bfd04680acaadd 100644 (file)
@@ -26,8 +26,14 @@ require_once 'www-header.php';
 $bookmarkservice = SemanticScuttle_Service_Factory::get('Bookmark');
 $cacheservice    = SemanticScuttle_Service_Factory::get('Cache');
 
-if (isset($_SERVER['PATH_INFO']) && strlen($_SERVER['PATH_INFO']) >1) {
-    list($url, $user, $cat) = explode('/', $_SERVER['PATH_INFO']);
+if (isset($_SERVER['PATH_INFO']) && strlen($_SERVER['PATH_INFO']) > 1) {
+    $parts = explode('/', $_SERVER['PATH_INFO']);
+    if (count($parts) == 3) {
+        list($url, $user, $cat) = $parts;
+    } else {
+        list($url, $user) = $parts;
+        $cat = null;
+    }
 } else {
     $url = '';
     $user = '';