From: Michael Gapczynski Date: Sun, 13 May 2012 19:26:05 +0000 (-0400) Subject: Check if path_info is empty as well, fixes bug oc-632. Thanks to die3lustigen2. X-Git-Tag: v4.0.0RC2~89^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a332c3947217b15b15c7855e41daf95c74576088;p=nextcloud-server.git Check if path_info is empty as well, fixes bug oc-632. Thanks to die3lustigen2. --- diff --git a/lib/json.php b/lib/json.php index 6782bad8bb7..f3bbe9ac899 100644 --- a/lib/json.php +++ b/lib/json.php @@ -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(); }