/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php
'trace' => $trace
];
return [
array_filter($array),
$scope
];
}
/**
* @param array $trace
* @return string
*/
protected function getFunction($trace)
{
if (!isset($trace['function'])) {
return '';
}
return $trace['function'] . '(' . implode(', ', $trace['args'] ?? []) . ')';
}
/**
* @param callable $callable
* @return string
*/
protected function resolveCallable(callable $callable)
{
if (is_array($callable)) {
return get_class($callable[0]) . '->' . $callable[1] . '()';
}
return 'unknown';
}
}
Arguments
"Object of class Nyholm\Psr7\ServerRequest could not be converted to string"
/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php
'trace' => $trace
];
return [
array_filter($array),
$scope
];
}
/**
* @param array $trace
* @return string
*/
protected function getFunction($trace)
{
if (!isset($trace['function'])) {
return '';
}
return $trace['function'] . '(' . implode(', ', $trace['args'] ?? []) . ')';
}
/**
* @param callable $callable
* @return string
*/
protected function resolveCallable(callable $callable)
{
if (is_array($callable)) {
return get_class($callable[0]) . '->' . $callable[1] . '()';
}
return 'unknown';
}
}
Arguments
", "
array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php
list($message, $scope) = $this->getDepracatedMessage($deprecated);
$collector->addMessage($message, $scope);
}
}
/**
* @param array $deprecated
* @return array
*/
protected function getDepracatedMessage($deprecated)
{
$scope = $deprecated['scope'];
$trace = [];
if (isset($deprecated['trace'])) {
foreach ($deprecated['trace'] as $current) {
$class = $current['class'] ?? '';
$type = $current['type'] ?? '';
$function = $this->getFunction($current);
if (isset($current['file'])) {
$current['file'] = str_replace(GRAV_ROOT . '/', '', $current['file']);
}
unset($current['class'], $current['type'], $current['function'], $current['args']);
if (isset($current['twig'])) {
$trace[] = $current['twig'];
} else {
$trace[] = ['call' => $class . $type . $function] + $current;
}
}
}
$array = [
'message' => $deprecated['message'],
'file' => $deprecated['file'],
'line' => $deprecated['line'],
'trace' => $trace
];
Arguments
array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#242}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php
return $list;
}
/**
* @return void
* @throws DebugBarException
*/
protected function addDeprecations()
{
if (!$this->deprecations) {
return;
}
$collector = new MessagesCollector('deprecated');
$this->addCollector($collector);
$collector->addMessage('Your site is using following deprecated features:');
/** @var array $deprecated */
foreach ($this->deprecations as $deprecated) {
list($message, $scope) = $this->getDepracatedMessage($deprecated);
$collector->addMessage($message, $scope);
}
}
/**
* @param array $deprecated
* @return array
*/
protected function getDepracatedMessage($deprecated)
{
$scope = $deprecated['scope'];
$trace = [];
if (isset($deprecated['trace'])) {
foreach ($deprecated['trace'] as $current) {
$class = $current['class'] ?? '';
$type = $current['type'] ?? '';
$function = $this->getFunction($current);
if (isset($current['file'])) {
Arguments
array:6 [
"scope" => "unknown"
"message" => "Creation of dynamic property RocketTheme\Toolbox\Event\Event::$page is deprecated"
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/PagesProcessor.php"
"line" => 77
"trace" => array:33 [
0 => array:6 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\PagesProcessor"
"type" => "->"
"args" => array:2 [
0 => "Nyholm\Psr7\ServerRequest $object"
1 => "Grav\Framework\RequestHandler\RequestHandler $object"
]
]
1 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#242}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
2 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/TwigProcessor.php"
"line" => 38
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#242}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
3 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\TwigProcessor"
"object" => Grav\Common\Processors\TwigProcessor {#241}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#242}
]
]
4 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#239}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
5 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/AssetsProcessor.php"
"line" => 39
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#239}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
6 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\AssetsProcessor"
"object" => Grav\Common\Processors\AssetsProcessor {#208}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#239}
]
]
7 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#205}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
8 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/SchedulerProcessor.php"
"line" => 40
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#205}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
9 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\SchedulerProcessor"
"object" => Grav\Common\Processors\SchedulerProcessor {#200}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#205}
]
]
10 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#201}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
11 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/BackupsProcessor.php"
"line" => 39
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#201}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
12 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\BackupsProcessor"
"object" => Grav\Common\Processors\BackupsProcessor {#202}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#201}
]
]
13 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#194}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
14 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/TasksProcessor.php"
"line" => 69
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#194}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
15 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\TasksProcessor"
"object" => Grav\Common\Processors\TasksProcessor {#199}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#194}
]
]
16 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#188}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
17 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/RequestProcessor.php"
"line" => 63
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#188}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#190}
]
]
18 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\RequestProcessor"
"object" => Grav\Common\Processors\RequestProcessor {#186}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#190}
1 => Grav\Framework\RequestHandler\RequestHandler {#188}
]
]
19 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#183}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
20 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/ThemesProcessor.php"
"line" => 38
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#183}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
21 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\ThemesProcessor"
"object" => Grav\Common\Processors\ThemesProcessor {#155}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#62}
1 => Grav\Framework\RequestHandler\RequestHandler {#183}
]
]
22 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#154}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
23 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/PluginsProcessor.php"
"line" => 39
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#154}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
24 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\PluginsProcessor"
"object" => Grav\Common\Processors\PluginsProcessor {#153}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#62}
1 => Grav\Framework\RequestHandler\RequestHandler {#154}
]
]
25 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#84}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
26 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/InitializeProcessor.php"
"line" => 130
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#84}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
27 => array:6 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php"
"line" => 546
"function" => "Grav\Common\Processors\{closure}"
"class" => "Grav\Common\Processors\InitializeProcessor"
"type" => "::"
"args" => []
]
28 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Processors/InitializeProcessor.php"
"line" => 129
"function" => "profile"
"class" => "Grav\Common\Debugger"
"object" => Grav\Common\Debugger {#5}
"type" => "->"
"args" => array:1 [
0 => Closure() {#151 …3}
]
]
29 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 50
"function" => "process"
"class" => "Grav\Common\Processors\InitializeProcessor"
"object" => Grav\Common\Processors\InitializeProcessor {#83}
"type" => "->"
"args" => array:2 [
0 => Nyholm\Psr7\ServerRequest {#62}
1 => Grav\Framework\RequestHandler\RequestHandler {#84}
]
]
30 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php"
"line" => 62
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#82}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
31 => array:7 [
"file" => "/home/armansan/dev/coa/system/src/Grav/Common/Grav.php"
"line" => 306
"function" => "handle"
"class" => "Grav\Framework\RequestHandler\RequestHandler"
"object" => Grav\Framework\RequestHandler\RequestHandler {#82}
"type" => "->"
"args" => array:1 [
0 => Nyholm\Psr7\ServerRequest {#62}
]
]
32 => array:7 [
"file" => "/home/armansan/dev/coa/index.php"
"line" => 54
"function" => "process"
"class" => "Grav\Common\Grav"
"object" => Grav\Common\Grav {#3}
"type" => "->"
"args" => []
]
]
"count" => 1
]
/home/armansan/dev/coa/system/src/Grav/Common/Debugger.php
return null;
}
/**
* Displays the debug bar
*
* @return $this
*/
public function render()
{
if ($this->enabled && $this->debugbar) {
// Only add assets if Page is HTML
$page = $this->grav['page'];
if (!$this->renderer || $page->templateFormat() !== 'html') {
return $this;
}
$this->addMeasures();
$this->addDeprecations();
echo $this->renderer->render();
}
return $this;
}
/**
* Sends the data through the HTTP headers
*
* @return $this
*/
public function sendDataInHeaders()
{
if ($this->enabled && $this->debugbar) {
$this->addMeasures();
$this->addDeprecations();
$this->debugbar->sendDataInHeaders();
}
/home/armansan/dev/coa/system/src/Grav/Common/Grav.php
$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 = '';
}
}
// Echo page content.
$this->header($response);
echo $body;
$this['debugger']->render();
// Response object can turn off all shutdown processing. This can be used for example to speed up AJAX responses.
// Note that using this feature will also turn off response compression.
if ($response->getHeaderLine('Grav-Internal-SkipShutdown') !== '1') {
register_shutdown_function([$this, 'shutdown']);
}
}
/**
* Terminates Grav request with a response.
*
* Please use this method instead of calling `die();` or `exit();`. Note that you need to create a response object.
*
* @param ResponseInterface $response
* @return never-return
*/
public function close(ResponseInterface $response): void
{
// Make sure nothing extra gets written to the response.
while (ob_get_level()) {
/home/armansan/dev/coa/index.php
if (!is_file($autoload)) {
die('Please run: <i>bin/grav install</i>');
}
// Register the auto-loader.
$loader = require $autoload;
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 $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
} catch (\Exception $e) {
$grav->fireEvent('onFatalException', new Event(array('exception' => $e)));
throw $e;
}