You are here

public function ExceptionHandler::cleanOutput in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/debug/ExceptionHandler.php \Symfony\Component\Debug\ExceptionHandler::cleanOutput()

@internal

File

vendor/symfony/debug/ExceptionHandler.php, line 460

Class

ExceptionHandler
ExceptionHandler converts an exception to a Response object.

Namespace

Symfony\Component\Debug

Code

public function cleanOutput($buffer) {
  if ($this->caughtLength) {

    // use substr_replace() instead of substr() for mbstring overloading resistance
    $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength);
    if (isset($cleanBuffer[0])) {
      $buffer = $cleanBuffer;
    }
  }
  return $buffer;
}