src/wcmf/lib/presentation/Application.php
public function outputHandler($buffer) {
    // log last error, if it's level is enabled
    $error = error_get_last();
    if ($error !== null && (in_array($error['type'], [E_ERROR, E_PARSE, E_COMPILE_ERROR]))) {
      $errorStr = $error['file']."::".$error['line'].": ".$error['type'].": ".$error['message'];
      self::$logger->error($errorStr);
      // suppress error message in browser
      if (!$this->debug) {
        header('HTTP/1.1 500 Internal Server Error');
        $buffer = '';
      }
      else {
        $buffer = "<pre>\n".$errorStr."\n</pre>";
      }
    }
    return trim($buffer);
  }
public function outputHandler($buffer) {
    // log last error, if it's level is enabled
    $error = error_get_last();
    if ($error !== null && (in_array($error['type'], [E_ERROR, E_PARSE, E_COMPILE_ERROR]))) {
      $errorStr = $error['file']."::".$error['line'].": ".$error['type'].": ".$error['message'];
      self::$logger->error($errorStr);
      // suppress error message in browser
      if (!$this->debug) {
        header('HTTP/1.1 500 Internal Server Error');
        $buffer = '';
      }
      else {
        $buffer = "<pre>\n".$errorStr."\n</pre>";
      }
    }
    return trim($buffer);
  }
public function outputHandler ( $ buffer ) { // log last error, if it's level is enabled $ error = error_get_last ( ) ; if ( $ error !== null && ( in_array ( $ error [ 'type' ] , [ E_ERROR , E_PARSE , E_COMPILE_ERROR ] ) ) ) { $ errorStr = $ error [ 'file' ] . "::" . $ error [ 'line' ] . ": " . $ error [ 'type' ] . ": " . $ error [ 'message' ] ; self :: $ logger -> error ( $ errorStr ) ; // suppress error message in browser if ( ! $ this -> debug ) { header ( 'HTTP/1.1 500 Internal Server Error' ) ; $ buffer = '' ; } else { $ buffer = "<pre>\n" . $ errorStr . "\n</pre>" ; } } return trim ( $ buffer ) ; }
This method is run as ob_start callback
@note must be public
@param $buffer The content to be returned to the client
@return String
This method is run as ob_start callback