8 if (get_magic_quotes_gpc()) {
9 foreach (
array(
'_GET',
'_POST',
'_COOKIE',
'_REQUEST') as $a) {
10 if (isset($$a) && is_array($$a)) {
11 foreach ($$a as &$v) {
17 $v = stripslashes($v);
22 if (get_magic_quotes_runtime()) {
23 set_magic_quotes_runtime(
false);
27 if (version_compare(PHP_VERSION,
'5.4.0',
'<')) {
32 require_once(dirname(dirname(__FILE__)).
'/lib/_autoload.php');
44 } elseif ($exception instanceof
Exception) {
45 $e =
new SimpleSAML_Error_Error(
'UNHANDLEDEXCEPTION', $exception);
48 if (class_exists(
'Error') && $exception instanceof Error) {
49 $code = $exception->getCode();
51 $errstr = $exception->getMessage();
52 $errfile = $exception->getFile();
53 $errline = $exception->getLine();
59 set_exception_handler(
'SimpleSAML_exception_handler');
64 if (!class_exists(
'SimpleSAML\Logger')) {
73 if (
SimpleSAML\Logger::isErrorMasked($errno)) {
93 set_error_handler(
'SimpleSAML_error_handler');
98 throw new \SimpleSAML\Error\CriticalConfigurationError(
SimpleSAML_error_handler($errno, $errstr, $errfile=null, $errline=0, $errcontext=null)
static callHooks($hook, &$data=null)
Call a hook in all enabled modules.
static initTimezone()
Initialize the timezone.
SimpleSAML_exception_handler($exception)
Attribute-related utility methods.
static installHandler()
Install this assertion handler.
Create styles array
The data for the language used.
removeMagicQuotes()
Disable magic quotes if they are enabled.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.