]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-21319 preventing debug output and cookies in mnet xmlrpc server script
authorPetr Skoda <skodak@moodle.org>
Tue, 12 Jan 2010 10:59:08 +0000 (10:59 +0000)
committerPetr Skoda <skodak@moodle.org>
Tue, 12 Jan 2010 10:59:08 +0000 (10:59 +0000)
mnet/xmlrpc/server.php

index e54d83c4488a0f0744f50980e65f48ac309f012b..5a3d249be0e946a747c6b669481e3c06dbc04b3c 100644 (file)
 
 // Make certain that config.php doesn't display any errors, and that it doesn't
 // override our do-not-display-errors setting:
-ini_set('display_errors',0);
+// disable moodle specific debug messages and any errors in output
+define('NO_DEBUG_DISPLAY', true);
+// cookies are not used, makes sure there is empty global $USER
+define('NO_MOODLE_COOKIES', true);
+
 require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
-ini_set('display_errors',0);
 
 // Include MNET stuff:
 require_once $CFG->dirroot.'/mnet/lib.php';