* @param int $target_width
* @param int $target_height
* @param int $new_width
* @param int $new_height
*
* @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;
"Allowed memory size of 268435456 bytes exhausted (tried to allocate 133650001 bytes)"
*
* @return void
*/
public function handleShutdown()
{
// If we reached this step, we are in shutdown handler.
// An exception thrown in a shutdown handler will not be propagated
// to the exception handler. Pass that information along.
$this->canThrowExceptions = false;
$error = $this->system->getLastError();
if ($error && Misc::isLevelFatal($error['type'])) {
// If there was a fatal error,
// it was not handled in handleError yet.
$this->allowQuit = false;
$this->handleError(
$error['type'],
$error['message'],
$error['file'],
$error['line']
);
}
}
/**
* @param InspectorFactoryInterface $factory
*
* @return void
*/
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.",
1
"Allowed memory size of 268435456 bytes exhausted (tried to allocate 133650001 bytes)"
"/html/vendor/getgrav/image/Gregwar/Image/Adapter/GD.php"
103
*/
public function registerShutdownFunction(callable $function)
{
$this->whoopsShutdownHandler = $function;
register_shutdown_function([$this, 'handleShutdown']);
}
/**
* Special case to deal with Fatal errors and the like.
*
* @return void
*/
public function handleShutdown()
{
$error = $this->getLastError();
// Ignore core warnings and errors.
if ($error && !($error['type'] & (E_CORE_WARNING | E_CORE_ERROR))) {
$handler = $this->whoopsShutdownHandler;
$handler();
}
}
/**
* @param int $httpCode
*
* @return int
*/
public function setHttpResponseCode($httpCode)
{
if (!headers_sent()) {
// Ensure that no 'location' header is present as otherwise this
// will override the HTTP code being set here, and mask the
// expected error page.
header_remove('location');
// Work around PHP bug #8218 (8.0.17 & 8.1.4).
header_remove('Content-Encoding');
}
Key | Value |
redirect_after_login | null
|
user | Grav\Common\User\User {#526} |
Key | Value |
GCONV_PATH | "/usr/local/php/lib64/gconv"
|
LO_PATH | "/usr/local/php/lib64/locale"
|
MAGICK_C0DER_MODULE_PATH | "/usr/local/php/lib64/ImageMagick-6.9.10/modules-Q16/coders"
|
OPENSSL_CONF | "/etc/ssl/openssl.cnf"
|
PATH | "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/command:/usr/local/salt/bin"
|
USER | "p159643"
|
HOME | "/home/www/p159643"
|
PATH_TRANSLATED | "/home/www/p159643/html/index.php"
|
PATH_INFO | "/"
|
SCRIPT_NAME | "/index.php"
|
REQUEST_URI | "/aktuelles/hauszeitung"
|
QUERY_STRING | "" |
REQUEST_METHOD | "GET"
|
SERVER_PROTOCOL | "HTTP/2.0"
|
GATEWAY_INTERFACE | "CGI/1.1"
|
REDIRECT_URL | "/aktuelles/hauszeitung"
|
REMOTE_PORT | "43912"
|
SCRIPT_FILENAME | "/home/www/p159643/html/index.php"
|
SERVER_ADMIN | "[no address given]"
|
CONTEXT_DOCUMENT_ROOT | "/home/www/p159643/html/"
|
CONTEXT_PREFIX | "" |
REQUEST_SCHEME | "https"
|
DOCUMENT_ROOT | "/home/www/p159643/html/"
|
REMOTE_ADDR | "34.204.52.16"
|
SERVER_PORT | "443"
|
SERVER_ADDR | "172.16.110.84"
|
SERVER_NAME | "evsozialstation-freiburg.de"
|
SERVER_SOFTWARE | "Apache"
|
SERVER_SIGNATURE | "" |
HTTP_HOST | "evsozialstation-freiburg.de"
|
HTTP_REFERER | "http://evsozialstation-freiburg.de/aktuelles/hauszeitung"
|
HTTP_USER_AGENT | "claudebot"
|
HTTP_ACCEPT | "*/*"
|
H2_STREAM_TAG | "1491793-5986-1"
|
H2_STREAM_ID | "1"
|
H2_PUSHED_ON | "" |
H2_PUSHED | "" |
H2_PUSH | "off"
|
H2PUSH | "off"
|
HTTP2 | "on"
|
SSL_TLS_SNI | "evsozialstation-freiburg.de"
|
HTTPS | "on"
|
REDIRECT_STATUS | "200"
|
REDIRECT_H2_STREAM_TAG | "1491793-5986-1"
|
REDIRECT_H2_STREAM_ID | "1"
|
REDIRECT_H2_PUSHED_ON | "" |
REDIRECT_H2_PUSHED | "" |
REDIRECT_H2_PUSH | "off"
|
REDIRECT_H2PUSH | "off"
|
REDIRECT_HTTP2 | "on"
|
REDIRECT_SSL_TLS_SNI | "evsozialstation-freiburg.de"
|
REDIRECT_HTTPS | "on"
|
FCGI_ROLE | "RESPONDER"
|
PHP_SELF | "/index.php/"
|
REQUEST_TIME_FLOAT | 1711669029.8889
|
REQUEST_TIME | 1711669029
|