Whoops\Exception\ErrorException: fwrite(): Write of 3094 bytes failed with errno=28 No space left on device in /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:139 Stack trace: #0 /usr/local/www/apache24/grav/system/src/Grav/Common/Debugger.php(843): Whoops\Run->handleError() #1 [internal function]: Grav\Common\Debugger->deprecatedErrorHandler() #2 /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(139): fwrite() #3 /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(125): Monolog\Handler\StreamHandler->streamWrite() #4 /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\StreamHandler->write() #5 /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle() #6 /usr/local/www/apache24/grav/vendor/monolog/monolog/src/Monolog/Logger.php(470): Monolog\Logger->addRecord() #7 /usr/local/www/apache24/grav/system/src/Grav/Common/Errors/Errors.php(73): Monolog\Logger->addCritical() #8 /usr/local/www/apache24/grav/vendor/filp/whoops/src/Whoops/Handler/CallbackHandler.php(50): Grav\Common\Errors\Errors->Grav\Common\Errors\{closure}() #9 /usr/local/www/apache24/grav/vendor/filp/whoops/src/Whoops/Run.php(398): Whoops\Handler\CallbackHandler->handle() #10 [internal function]: Whoops\Run->handleException() #11 {main} Crikey! There was an error...
Whoops \ Exception \ ErrorException (E_NOTICE)
file_put_contents(): Write of 2931 bytes failed with errno=28 No space left on device Whoops\Exception\ErrorException thrown with message "file_put_contents(): Write of 2931 bytes failed with errno=28 No space left on device" Stacktrace: #19 Whoops\Exception\ErrorException in /usr/local/www/apache24/grav/user/plugins/problems/classes/Problems/Base/ProblemChecker.php:74 #18 file_put_contents in /usr/local/www/apache24/grav/user/plugins/problems/classes/Problems/Base/ProblemChecker.php:74 #17 Grav\Plugin\Problems\Base\ProblemChecker:storeStatusFile in /usr/local/www/apache24/grav/user/plugins/problems/problems.php:99 #16 Grav\Plugin\ProblemsPlugin:onPluginsInitialized in /usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:264 #15 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:239 #14 Symfony\Component\EventDispatcher\EventDispatcher:callListeners in /usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php:73 #13 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /usr/local/www/apache24/grav/system/src/Grav/Common/Grav.php:597 #12 Grav\Common\Grav:fireEvent in /usr/local/www/apache24/grav/system/src/Grav/Common/Processors/PluginsProcessor.php:36 #11 Grav\Common\Processors\PluginsProcessor:process in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #10 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #9 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Common/Processors/InitializeProcessor.php:130 #8 Grav\Common\Processors\InitializeProcessor:Grav\Common\Processors\{closure} in /usr/local/www/apache24/grav/system/src/Grav/Common/Debugger.php:546 #7 Grav\Common\Debugger:profile in /usr/local/www/apache24/grav/system/src/Grav/Common/Processors/InitializeProcessor.php:129 #6 Grav\Common\Processors\InitializeProcessor:process in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #5 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #4 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php:40 #3 Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport:process in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:50 #2 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php:62 #1 Grav\Framework\RequestHandler\RequestHandler:handle in /usr/local/www/apache24/grav/system/src/Grav/Common/Grav.php:312 #0 Grav\Common\Grav:process in /usr/local/www/apache24/grav/index.php:47
Stack frames (20)
19
Whoops\Exception\ErrorException
/user/plugins/problems/classes/Problems/Base/ProblemChecker.php74
18
file_put_contents
/user/plugins/problems/classes/Problems/Base/ProblemChecker.php74
17
Grav\Plugin\Problems\Base\ProblemChecker storeStatusFile
/user/plugins/problems/problems.php99
16
Grav\Plugin\ProblemsPlugin onPluginsInitialized
/vendor/symfony/event-dispatcher/EventDispatcher.php264
15
Symfony\Component\EventDispatcher\EventDispatcher doDispatch
/vendor/symfony/event-dispatcher/EventDispatcher.php239
14
Symfony\Component\EventDispatcher\EventDispatcher callListeners
/vendor/symfony/event-dispatcher/EventDispatcher.php73
13
Symfony\Component\EventDispatcher\EventDispatcher dispatch
/system/src/Grav/Common/Grav.php597
12
Grav\Common\Grav fireEvent
/system/src/Grav/Common/Processors/PluginsProcessor.php36
11
Grav\Common\Processors\PluginsProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
10
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
9
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Processors/InitializeProcessor.php130
8
Grav\Common\Processors\InitializeProcessor Grav\Common\Processors\{closure}
/system/src/Grav/Common/Debugger.php546
7
Grav\Common\Debugger profile
/system/src/Grav/Common/Processors/InitializeProcessor.php129
6
Grav\Common\Processors\InitializeProcessor process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
5
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
4
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php40
3
Grav\Framework\RequestHandler\Middlewares\MultipartRequestSupport process
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php50
2
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php62
1
Grav\Framework\RequestHandler\RequestHandler handle
/system/src/Grav/Common/Grav.php312
0
Grav\Common\Grav process
/index.php47
/usr/local/www/apache24/grav/user/plugins/problems/classes/Problems/Base/ProblemChecker.php
    {
        return $this->status_file;
    }
 
    /**
     * @return bool
     */
    public function statusFileExists(): bool
    {
        return file_exists($this->status_file);
    }
 
    /**
     * @return void
     */
    public function storeStatusFile(): void
    {
        $problems = $this->getProblemsSerializable();
        $json = json_encode($problems);
        file_put_contents($this->status_file, $json);
    }
 
    /**
     * @param string|null $problems_dir
     * @return bool
     */
    public function check($problems_dir = null): bool
    {
        $problems_dir = $problems_dir ?: dirname(__DIR__);
        $problems = [];
        $problems_found = false;
 
        $iterator = new \DirectoryIterator($problems_dir);
        foreach ($iterator as $file) {
            if (!$file->isFile() || $file->getExtension() !== 'php') {
                continue;
            }
            $classname = 'Grav\\Plugin\\Problems\\' . $file->getBasename('.php');
            if (class_exists($classname)) {
                /** @var Problem $problem */
Arguments
  1. "file_put_contents(): Write of 2931 bytes failed with errno=28 No space left on device"
    
/usr/local/www/apache24/grav/user/plugins/problems/classes/Problems/Base/ProblemChecker.php
    {
        return $this->status_file;
    }
 
    /**
     * @return bool
     */
    public function statusFileExists(): bool
    {
        return file_exists($this->status_file);
    }
 
    /**
     * @return void
     */
    public function storeStatusFile(): void
    {
        $problems = $this->getProblemsSerializable();
        $json = json_encode($problems);
        file_put_contents($this->status_file, $json);
    }
 
    /**
     * @param string|null $problems_dir
     * @return bool
     */
    public function check($problems_dir = null): bool
    {
        $problems_dir = $problems_dir ?: dirname(__DIR__);
        $problems = [];
        $problems_found = false;
 
        $iterator = new \DirectoryIterator($problems_dir);
        foreach ($iterator as $file) {
            if (!$file->isFile() || $file->getExtension() !== 'php') {
                continue;
            }
            $classname = 'Grav\\Plugin\\Problems\\' . $file->getBasename('.php');
            if (class_exists($classname)) {
                /** @var Problem $problem */
/usr/local/www/apache24/grav/user/plugins/problems/problems.php
        if (\defined('GRAV_CLI') || $this->isAdmin()) {
            return;
        }
 
        $this->enable([
            'onFatalException' => ['onFatalException', 0],
        ]);
 
        $this->checker = new ProblemChecker();
 
        if (!$this->checker->statusFileExists()) {
            // If no issues remain, save a state file in the cache
            if (!$this->problemsFound()) {
                // delete any existing validated files
                /** @var \SplFileInfo $fileInfo */
                foreach (new \GlobIterator(CACHE_DIR . ProblemChecker::PROBLEMS_PREFIX . '*') as $fileInfo) {
                    @unlink($fileInfo->getPathname());
                }
                // create a file in the cache dir so it only runs on cache changes
                $this->checker->storeStatusFile();
            } else {
                $this->renderProblems();
            }
        }
    }
 
    /**
     * @return never-return
     */
    private function renderProblems(): void
    {
        /** @var Uri $uri */
        $uri = $this->grav['uri'];
 
        /** @var Environment $twig */
        $twig = $this->getTwig();
 
        $data = [
            'problems' => $this->problems,
            'base_url' => $baseUrlRelative = $uri->rootUrl(false),
/usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
        foreach ($listeners as $listener) {
            if ($event->isPropagationStopped()) {
                break;
            }
            $listener($event, $eventName, $this);
        }
    }
 
    /**
     * Sorts the internal list of listeners for the given event by priority.
     */
    private function sortListeners(string $eventName)
    {
        krsort($this->listeners[$eventName]);
        $this->sorted[$eventName] = [];
 
        foreach ($this->listeners[$eventName] as &$listeners) {
            foreach ($listeners as $k => &$listener) {
                if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
                    $listener[0] = $listener[0]();
                    $listener[1] = $listener[1] ?? '__invoke';
                }
                $this->sorted[$eventName][] = $listener;
            }
        }
/usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php
            } else {
                $this->removeListener($eventName, [$subscriber, \is_string($params) ? $params : $params[0]]);
            }
        }
    }
 
    /**
     * Triggers the listeners of an event.
     *
     * This method can be overridden to add functionality that is executed
     * for each listener.
     *
     * @param callable[] $listeners The event listeners
     * @param string     $eventName The name of the event to dispatch
     * @param object     $event     The event object to pass to the event handlers/listeners
     */
    protected function callListeners(iterable $listeners, string $eventName, $event)
    {
        if ($event instanceof Event) {
            $this->doDispatch($listeners, $eventName, $event);
 
            return;
        }
 
        $stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
 
        foreach ($listeners as $listener) {
            if ($stoppable && $event->isPropagationStopped()) {
                break;
            }
            // @deprecated: the ternary operator is part of a BC layer and should be removed in 5.0
            $listener($listener instanceof WrappedListener ? new LegacyEventProxy($event) : $event, $eventName, $this);
        }
    }
 
    /**
     * @deprecated since Symfony 4.3, use callListeners() instead
     */
    protected function doDispatch($listeners, $eventName, Event $event)
    {
/usr/local/www/apache24/grav/vendor/symfony/event-dispatcher/EventDispatcher.php
 
        if (\is_object($event)) {
            $eventName = $eventName ?? \get_class($event);
        } elseif (\is_string($event) && (null === $eventName || $eventName instanceof ContractsEvent || $eventName instanceof Event)) {
            @trigger_error(sprintf('Calling the "%s::dispatch()" method with the event name as the first argument is deprecated since Symfony 4.3, pass it as the second argument and provide the event object as the first argument instead.', EventDispatcherInterface::class), \E_USER_DEPRECATED);
            $swap = $event;
            $event = $eventName ?? new Event();
            $eventName = $swap;
        } else {
            throw new \TypeError(sprintf('Argument 1 passed to "%s::dispatch()" must be an object, "%s" given.', EventDispatcherInterface::class, \is_object($event) ? \get_class($event) : \gettype($event)));
        }
 
        if (null !== $this->optimized && null !== $eventName) {
            $listeners = $this->optimized[$eventName] ?? (empty($this->listeners[$eventName]) ? [] : $this->optimizeListeners($eventName));
        } else {
            $listeners = $this->getListeners($eventName);
        }
 
        if ($listeners) {
            $this->callListeners($listeners, $eventName, $event);
        }
 
        return $event;
    }
 
    /**
     * {@inheritdoc}
     */
    public function getListeners($eventName = null)
    {
        if (null !== $eventName) {
            if (empty($this->listeners[$eventName])) {
                return [];
            }
 
            if (!isset($this->sorted[$eventName])) {
                $this->sortListeners($eventName);
            }
 
            return $this->sorted[$eventName];
/usr/local/www/apache24/grav/system/src/Grav/Common/Grav.php
        return $event;
    }
 
    /**
     * Fires an event with optional parameters.
     *
     * @param  string $eventName
     * @param  Event|null $event
     * @return Event
     */
    public function fireEvent($eventName, Event $event = null)
    {
        /** @var EventDispatcherInterface $events */
        $events = $this['events'];
        if (null === $event) {
            $event = new Event();
        }
 
        $timestamp = microtime(true);
        $events->dispatch($event, $eventName);
 
        /** @var Debugger $debugger */
        $debugger = $this['debugger'];
        $debugger->addEvent($eventName, $event, $events, $timestamp);
 
        return $event;
    }
 
    /**
     * Set the final content length for the page and flush the buffer
     *
     * @return void
     */
    public function shutdown(): void
    {
        // Prevent user abort allowing onShutdown event to run without interruptions.
        if (function_exists('ignore_user_abort')) {
            @ignore_user_abort(true);
        }
 
/usr/local/www/apache24/grav/system/src/Grav/Common/Processors/PluginsProcessor.php
 * Class PluginsProcessor
 * @package Grav\Common\Processors
 */
class PluginsProcessor extends ProcessorBase
{
    /** @var string */
    public $id = 'plugins';
    /** @var string */
    public $title = 'Initialize Plugins';
 
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $this->startTimer();
        $grav = $this->container;
        $grav->fireEvent('onPluginsInitialized');
        $this->stopTimer();
 
        return $handler->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Common/Processors/InitializeProcessor.php
        // Initialize URI (uses session, see issue #3269).
        $this->initializeUri($config);
 
        // Grav may return redirect response right away.
        $redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
        if ($redirectCode) {
            $response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
 
/usr/local/www/apache24/grav/system/src/Grav/Common/Debugger.php
        }
 
        $this->addMeasures();
        $this->addDeprecations();
        $this->timers = [];
 
        return $this->debugbar->getData();
    }
 
    /**
     * Hierarchical Profiler support.
     *
     * @param callable $callable
     * @param string|null $message
     * @return mixed
     */
    public function profile(callable $callable, string $message = null)
    {
        $this->startProfiling();
        $response = $callable();
        $this->stopProfiling($message);
 
        return $response;
    }
 
    public function addTwigProfiler(Environment $twig): void
    {
        $clockwork = $this->getClockwork();
        if ($clockwork) {
            $source = new TwigClockworkDataSource($twig);
            $source->listenToEvents();
            $clockwork->addDataSource($source);
        }
    }
 
    /**
     * Start profiling code.
     *
     * @return void
     */
/usr/local/www/apache24/grav/system/src/Grav/Common/Processors/InitializeProcessor.php
 
        // Initialize URI (uses session, see issue #3269).
        $this->initializeUri($config);
 
        // Grav may return redirect response right away.
        $redirectCode = (int)$config->get('system.pages.redirect_trailing_slash', 1);
        if ($redirectCode) {
            $response = $this->handleRedirectRequest($request, $redirectCode > 300 ? $redirectCode : null);
            if ($response) {
                $this->stopTimer('_init');
 
                return $response;
            }
        }
 
        $this->stopTimer('_init');
 
        // Wrap call to next handler so that debugger can profile it.
        /** @var Response $response */
        $response = $debugger->profile(static function () use ($handler, $request) {
            return $handler->handle($request);
        });
 
        // Log both request and response and return the response.
        return $debugger->logRequest($request, $response);
    }
 
    public function processCli(): void
    {
        // Load configuration.
        $config = $this->initializeConfig();
 
        // Initialize logger.
        $this->initializeLogger($config);
 
        // Disable debugger.
        $this->container['debugger']->enabled(false);
 
        // Set timezone, locale.
        $this->initializeLocale($config);
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Middlewares/MultipartRequestSupport.php
use function in_array;
use function is_array;
use function strlen;
 
/**
 * Multipart request support for PUT and PATCH.
 */
class MultipartRequestSupport implements MiddlewareInterface
{
    /**
     * @param ServerRequestInterface $request
     * @param RequestHandlerInterface $handler
     * @return ResponseInterface
     */
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $contentType = $request->getHeaderLine('content-type');
        $method = $request->getMethod();
        if (!str_starts_with($contentType, 'multipart/form-data') || !in_array($method, ['PUT', 'PATH'], true)) {
            return $handler->handle($request);
        }
 
        $boundary = explode('; boundary=', $contentType, 2)[1] ?? '';
        $parts = explode("--{$boundary}", $request->getBody()->getContents());
        $parts = array_slice($parts, 1, count($parts) - 2);
 
        $params = [];
        $files = [];
        foreach ($parts as $part) {
            $this->processPart($params, $files, $part);
        }
 
        return $handler->handle($request->withParsedBody($params)->withUploadedFiles($files));
    }
 
    /**
     * @param array $params
     * @param array $files
     * @param string $part
     * @return void
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
    protected $handler;
 
    /** @var ContainerInterface|null */
    protected $container;
 
    /**
     * {@inheritdoc}
     * @throws InvalidArgumentException
     */
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $middleware = array_shift($this->middleware);
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php
 
        // Use default callable if there is no middleware.
        if ($middleware === null) {
            return call_user_func($this->handler, $request);
        }
 
        if ($middleware instanceof MiddlewareInterface) {
            return $middleware->process($request, clone $this);
        }
 
        if (null === $this->container || !$this->container->has($middleware)) {
            throw new InvalidArgumentException(
                sprintf('The middleware is not a valid %s and is not passed in the Container', MiddlewareInterface::class),
                $middleware
            );
        }
 
        array_unshift($this->middleware, $this->container->get($middleware));
 
        return $this->handle($request);
    }
}
 
/usr/local/www/apache24/grav/system/src/Grav/Common/Grav.php
                },
                'pagesProcessor' => function () {
                    return new PagesProcessor($this);
                },
                'debuggerAssetsProcessor' => function () {
                    return new DebuggerAssetsProcessor($this);
                },
                'renderProcessor' => function () {
                    return new RenderProcessor($this);
                },
            ]
        );
 
        $default = static function () {
            return new Response(404, ['Expires' => 0, 'Cache-Control' => 'no-store, max-age=0'], 'Not Found');
        };
 
        $collection = new RequestHandler($this->middleware, $default, $container);
 
        $response = $collection->handle($this['request']);
        $body = $response->getBody();
 
        /** @var Messages $messages */
        $messages = $this['messages'];
 
        // Prevent caching if session messages were displayed in the page.
        $noCache = $messages->isCleared();
        if ($noCache) {
            $response = $response->withHeader('Cache-Control', 'no-store, max-age=0');
        }
 
        // Handle ETag and If-None-Match headers.
        if ($response->getHeaderLine('ETag') === '1') {
            $etag = md5($body);
            $response = $response->withHeader('ETag', '"' . $etag . '"');
 
            $search = trim($this['request']->getHeaderLine('If-None-Match'), '"');
            if ($noCache === false && $search === $etag) {
                $response = $response->withStatus(304);
                $body = '';
/usr/local/www/apache24/grav/index.php
 
// Register the auto-loader.
$loader = require $autoload;
 
// Set timezone to default, falls back to system if php.ini not set
date_default_timezone_set(@date_default_timezone_get());
 
// Set internal encoding.
@ini_set('default_charset', 'UTF-8');
mb_internal_encoding('UTF-8');
 
use Grav\Common\Grav;
use RocketTheme\Toolbox\Event\Event;
 
// Get the Grav instance
$grav = Grav::instance(array('loader' => $loader));
 
// Process the page
try {
    $grav->process();
} catch (\Error|\Exception $e) {
    $grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
    throw $e;
}
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"claudebot"
HTTP_HOST
"www.eggfreckles.net"
PATH
"/sbin:/bin:/usr/sbin:/usr/bin"
LD_LIBRARY_PATH
"/usr/local/lib"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.58 (FreeBSD) OpenSSL/3.0.12 PHP/8.2.14"
SERVER_NAME
"www.eggfreckles.net"
SERVER_ADDR
"172.31.23.81"
SERVER_PORT
"80"
REMOTE_ADDR
"3.239.214.173"
DOCUMENT_ROOT
"/usr/local/www/apache24/grav"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/usr/local/www/apache24/grav"
SERVER_ADMIN
"tbrand@mit.edu"
SCRIPT_FILENAME
"/usr/local/www/apache24/grav/index.php"
REMOTE_PORT
"38178"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
""
REQUEST_URI
"/"
SCRIPT_NAME
"/index.php"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710818807.9026
REQUEST_TIME
1710818807
empty
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\CallbackHandler