]> source.dussan.org Git - nextcloud-server.git/commitdiff
set debug mode if an xdebug session is active
authorRobin Appelman <icewind@owncloud.com>
Sat, 1 Sep 2012 18:51:48 +0000 (20:51 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sat, 1 Sep 2012 18:52:13 +0000 (20:52 +0200)
lib/base.php

index bfefa1425ab7beb2dac452793e6a39e5f9d8b4ff..1875edb50005a3dfece5d5199a10f57a6288acca 100644 (file)
@@ -315,6 +315,13 @@ class OC{
 
                self::initPaths();
 
+               // set debug mode if an xdebug session is active
+               if (!defined('DEBUG') || !DEBUG){
+                       if(isset($_COOKIE['XDEBUG_SESSION'])){
+                               define('DEBUG',true);
+                       }
+               }
+
                // register the stream wrappers
                require_once('streamwrappers.php');
                stream_wrapper_register("fakedir", "OC_FakeDirStream");