file_exists(): open_basedir restriction in effect. File(unknown) is not within the allowed path(s): (/home/ghafoor2/domains/filenab.com/:/tmp/:/usr/local/php-7.4/lib/php/)
Exception
return $this;
}
public function get(string $fileName): array
{
if (! file_exists($fileName)) {
return [];
}
try {
$file = new File($fileName);
return $this;
}
public function get(string $fileName): array
{
if (! file_exists($fileName)) {
return [];
}
try {
$file = new File($fileName);
public function toArray(): array
{
$codeSnippet = (new Codesnippet())
->snippetLineCount(31)
->surroundingLine($this->lineNumber)
->get($this->file);
return [
'line_number' => $this->lineNumber,
'method' => $this->method,
'class' => $this->class,
}
public function toArray(): array
{
return array_map(function (Frame $frame) {
return $frame->toArray();
}, $this->frames);
}
public function firstApplicationFrame(): ?Frame
{
public function toArray(): array
{
return array_map(function (Frame $frame) {
return $frame->toArray();
}, $this->frames);
}
public function firstApplicationFrame(): ?Frame
{
foreach ($this->frames as $index => $frame) {
'exception_class' => $this->exceptionClass,
'seen_at' => $this->getCurrentTime(),
'message' => $this->message,
'glows' => $this->glows,
'solutions' => $this->solutions,
'stacktrace' => $this->stacktrace->toArray(),
'context' => $this->allContext(),
'stage' => $this->stage,
'message_level' => $this->messageLevel,
'open_frame_index' => $this->openFrameIndex,
'group_by' => $this->groupBy ?? GroupingTypes::TOP_FRAME,
}
}
public function report(): array
{
return $this->report->toArray();
}
public function jsonEncode($data): string
{
$jsonOptions = JSON_PARTIAL_OUTPUT_ON_ERROR | JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP | JSON_HEX_QUOT;
'telescopeUrl' => $this->telescopeUrl(),
'shareEndpoint' => $this->shareEndpoint(),
'title' => $this->title(),
'config' => $this->config(),
'solutions' => $this->solutions(),
'report' => $this->report(),
'housekeepingEndpoint' => url(config('ignition.housekeeping_endpoint_prefix', '_ignition')),
'styles' => $this->styles(),
'scripts' => $this->scripts(),
'tabs' => $this->tabs(),
'jsonEncode' => Closure::fromCallable([$this, 'jsonEncode']),
protected function renderException(ErrorPageViewModel $exceptionViewModel)
{
echo $this->renderer->render(
'errorPage',
$exceptionViewModel->toArray()
);
}
}
$solutions
);
$viewModel->defaultTab($defaultTab, $defaultTabProps);
$this->renderException($viewModel);
}
public function handleReport(Report $report, $defaultTab = null, $defaultTabProps = [])
{
$viewModel = new ErrorPageViewModel(
}
public function handle(): ?int
{
try {
$this->errorPageHandler->handle($this->exception);
} catch (Error $error) {
// Errors aren't caught by Whoops.
// Convert the error to an exception and throw again.
throw new ErrorException(
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
// Collect the content type for possible sending in the headers.
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
$whoops->appendHandler($this->whoopsHandler());
$whoops->writeToOutput(false);
$whoops->allowQuit(false);
})->handleException($e);
}
/**
* Get the Whoops handler for the application.
*
*/
protected function renderExceptionContent(Throwable $e)
{
try {
return config('app.debug') && class_exists(Whoops::class)
? $this->renderExceptionWithWhoops($e)
: $this->renderExceptionWithSymfony($e, config('app.debug'));
} catch (Exception $e) {
return $this->renderExceptionWithSymfony($e, config('app.debug'));
}
}
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function convertExceptionToResponse(Throwable $e)
{
return SymfonyResponse::create(
$this->renderExceptionContent($e),
$this->isHttpException($e) ? $e->getStatusCode() : 500,
$this->isHttpException($e) ? $e->getHeaders() : []
);
}