Example #1
0
 public static function init()
 {
     if (0 !== strpos(self::$error_log, BASEDIR)) {
         self::$error_log = BASEDIR . self::$error_log;
     }
     self::runAs();
     self::$version = (int) preg_replace('#^(\\d)\\.(\\d).*#', '$1$2', phpversion());
     if ($disabled = ini_get('disable_functions')) {
         trigger_error('Host provider disabled the following functions: ' . $disabled, E_USER_NOTICE);
     }
     self::$can_set = false === strpos($disabled, 'ini_set');
     if (self::$can_set) {
         self::defaults();
     } else {
         if (self::$version < 53) {
             set_magic_quotes_runtime(0);
         }
     }
     // even if ini_set is disabled calling the function still works
 }