/www/wwwroot/154.218.168.34/vendor/getgrav/image/Gregwar/Image/Adapter/GD.php
$w = $this->width();
$h = $this->height();
$n = imagecreatetruecolor($w, $h);
imagefill($n, 0, 0, ImageColor::gdAllocate($this->resource, $background));
imagecopyresampled($n, $this->resource, 0, 0, 0, 0, $w, $h, $w, $h);
imagedestroy($this->resource);
$this->resource = $n;
return $this;
}
protected function doResize($bg, int $target_width, int $target_height, int $new_width, int $new_height)
{
$width = $this->width();
$height = $this->height();
$n = imagecreatetruecolor($target_width, $target_height);
if ($bg !== 'transparent') {
imagefill($n, 0, 0, ImageColor::gdAllocate($this->resource, $bg));
} else {
imagealphablending($n, false);
$color = ImageColor::gdAllocate($this->resource, 'transparent');
imagefill($n, 0, 0, $color);
imagesavealpha($n, true);
}
imagecopyresampled($n, $this->resource, (int) (($target_width - $new_width) / 2), (int) (($target_height - $new_height) / 2), 0, 0, $new_width, $new_height, $width, $height);
imagedestroy($this->resource);
$this->resource = $n;
return $this;
}
public function crop($x, $y, $width, $height)
{
$destination = imagecreatetruecolor($width, $height);
imagealphablending($destination, false);
imagesavealpha($destination, true);
imagecopy($destination, $this->resource, 0, 0, (int) $x, (int) $y, $this->width(), $this->height());
imagedestroy($this->resource);
$this->resource = $destination;
return $this;
}
public function negate()
{
imagefilter($this->resource, IMG_FILTER_NEGATE);
Arguments
"Allowed memory size of 134217728 bytes exhausted (tried to allocate 1622016 bytes)"
/www/wwwroot/154.218.168.34/vendor/filp/whoops/src/Whoops/Run.php
return true;
}
}
$exception = new ErrorException($message, $level, $level, $file, $line);
if ($this->canThrowExceptions) {
throw $exception;
} else {
$this->handleException($exception);
}
return true;
}
return false;
}
public function handleShutdown()
{
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
$this->allowQuit = false;
$this->handleError($error['type'], $error['message'], $error['file'], $error['line']);
}
}
public function setInspectorFactory(InspectorFactoryInterface $factory)
{
$this->inspectorFactory = $factory;
}
public function addFrameFilter($filterCallback)
{
if (!is_callable($filterCallback)) {
throw new \InvalidArgumentException(sprintf("A frame filter must be of type callable, %s type given.", gettype($filterCallback)));
}
$this->frameFilters[] = $filterCallback;
return $this;
}
private function getInspector($exception)
{
return $this->inspectorFactory->create($exception);
}
private function resolveHandler($handler)
{
/www/wwwroot/154.218.168.34/system/src/Grav/Common/Errors/SystemFacade.php
<?php
namespace Grav\Common\Errors;
class SystemFacade extends \Whoops\Util\SystemFacade
{
protected $whoopsShutdownHandler;
public function registerShutdownFunction(callable $function)
{
$this->whoopsShutdownHandler = $function;
register_shutdown_function([$this, 'handleShutdown']);
}
public function handleShutdown()
{
$error = $this->getLastError();
if ($error && !($error['type'] & (E_CORE_WARNING | E_CORE_ERROR))) {
$handler = $this->whoopsShutdownHandler;
$handler();
}
}
public function setHttpResponseCode($httpCode)
{
if (!headers_sent()) {
header_remove('location');
header_remove('Content-Encoding');
}
return http_response_code($httpCode);
}
}