]> source.dussan.org Git - nextcloud-server.git/commitdiff
Check if path_info is empty as well, fixes bug oc-632. Thanks to die3lustigen2.
authorMichael Gapczynski <GapczynskiM@gmail.com>
Sun, 13 May 2012 19:26:05 +0000 (15:26 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Sun, 13 May 2012 19:26:30 +0000 (15:26 -0400)
lib/json.php

index 6782bad8bb70dc95a2f3f7dc287a0bf8f449388c..f3bbe9ac89976767adf01441d329970fc0457631 100644 (file)
@@ -73,7 +73,7 @@ class OC_JSON{
        * Encode and print $data in json format
        */
        public static function encodedPrint($data,$setContentType=true){
-               if(!isset($_SERVER['PATH_INFO'])) {
+               if(!isset($_SERVER['PATH_INFO']) || $_SERVER['PATH_INFO'] == '') {
                        if($setContentType){
                                self::setContentTypeHeader();
                        }