SimpleSAML\Logger::popErrorMask PHP Method

popErrorMask() public static method

This function restores the previous error mask.
public static popErrorMask ( )
    public static function popErrorMask()
    {
        $lastMask = array_pop(self::$logLevelStack);
        error_reporting($lastMask[0]);
        self::$logMask = $lastMask[1];
    }

Usage Example

Example #1
0
 /**
  * Initialize the timezone.
  *
  * This function should be called before any calls to date().
  *
  * @author Olav Morken, UNINETT AS <*****@*****.**>
  */
 public static function initTimezone()
 {
     if (self::$tz_initialized) {
         return;
     }
     $globalConfig = \SimpleSAML_Configuration::getInstance();
     $timezone = $globalConfig->getString('timezone', null);
     if ($timezone !== null) {
         if (!date_default_timezone_set($timezone)) {
             throw new \SimpleSAML_Error_Exception('Invalid timezone set in the "timezone" option in config.php.');
         }
         self::$tz_initialized = true;
         return;
     }
     // we don't have a timezone configured
     Logger::maskErrors(E_ALL);
     $serverTimezone = date_default_timezone_get();
     Logger::popErrorMask();
     // set the timezone to the default
     date_default_timezone_set($serverTimezone);
     self::$tz_initialized = true;
 }
All Usage Examples Of SimpleSAML\Logger::popErrorMask