//Security - $this->forum returns false if get_id is not valid or is for a private forum
if(!$this->forum) exit();
//Set page title
$this->assign('pg_title',$this->forum['sForumName']);
include $this->loadTemplate('header.tpl.php');
include $this->loadTemplate('navigation.tpl.php');
?>
case "forums":
include $this->loadTemplate('forums.tpl.php');
break;
case "forums.topics":
if(!$this->get_id) $this->helper->redirect($this->cf_url); // ID Required for this template
include $this->loadTemplate('forums.topics.tpl.php');
break;
case "forums.posts":
if(!$this->get_id) $this->helper->redirect($this->cf_url); // ID Required for this template
include $this->loadTemplate('forums.posts.tpl.php');
break;
// start capturing output into a buffer
ob_start();
// include the requested template filename in the local scope
// (this will execute the view logic).
include $this->_script;
// done with the requested template; get the buffer and
// clear it.
$this->_output = ob_get_contents();
ob_end_clean();
break;
}
//Get template results
$display = $tpl->fetch();
//Required so IE doesn't fall back to incorrect version
// of document mode
header('X-UA-Compatible: IE=Edge');
/*
* Portal Routes
*/
$index = (function () {
$response = require_once cBASEPATH.'/index.php';
if ($response instanceof \Symfony\Component\HttpFoundation\Response) {
return $response;
}
if ($this->isSerializedClosure()) {
$callable = unserialize($this->action['uses'])->getClosure();
}
return $callable(...array_values($this->resolveMethodDependencies(
$this->parametersWithoutNulls(), new ReflectionFunction($callable)
)));
}
/**
* Determine if the route action is a serialized Closure.
try {
if ($this->isControllerAction()) {
return $this->runController();
}
return $this->runCallable();
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
return (new Pipeline($this->container))
->send($request)
->through($middleware)
->then(function ($request) use ($route) {
return $this->prepareResponse(
$request, $route->run()
);
});
}
/**
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
if (strpos($request->fullUrl(), '/admin.php') !== false && $request->isMethod('get')) {
$request->session()->reflash();
return redirect($this->cleanAdminUrl($request->fullUrl()));
}
return $next($request);
}
protected function cleanAdminUrl($redirectTo)
{
return with(str_replace('/admin.php', '/admin', $redirectTo), function($redirectTo) {
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if (! $installed && Route::is('install') === false) {
return redirect()->route('install');
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
throw $exception;
}
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
$this->isReading($request) ||
$this->runningUnitTests() ||
$this->inExceptArray($request) ||
$this->tokensMatch($request)
) {
return tap($next($request), function ($response) use ($request) {
if ($this->shouldAddXsrfTokenCookie()) {
$this->addCookieToResponse($request, $response);
}
});
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
// Putting the errors in the view for every view allows the developer to just
// assume that some errors are always available, which is convenient since
// they don't have to continually run checks for the presence of errors.
return $next($request);
}
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
return redirect()->to('index?pg=maintenance');
}
}
return $next($request);
}
/**
* Return a valid Array (JSON) format for maintenance mode API responses
* @return array[]
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
$this->startSession($request, $session)
);
$this->collectGarbage($session);
$response = $next($request);
$this->storeCurrentUrl($request, $session);
$this->addCookieToResponse($response, $session);
if ($this->manager->shouldBlock() ||
($request->route() instanceof Route && $request->route()->locksFor())) {
return $this->handleRequestWhileBlocking($request, $session, $next);
}
return $this->handleStatefulRequest($request, $session, $next);
}
/**
* Handle the given request within session state.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$response = $next($request);
foreach ($this->cookies->getQueuedCookies() as $cookie) {
$response->headers->setCookie($cookie);
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
* @param \Closure $next
* @return \Symfony\Component\HttpFoundation\Response
*/
public function handle($request, Closure $next)
{
return $this->encrypt($next($this->decrypt($request)));
}
/**
* Decrypt the cookies on the request.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
->through($middleware)
->then(function ($request) use ($route) {
return $this->prepareResponse(
$request, $route->run()
);
});
}
/**
* Gather the middleware for the given route with resolved class names.
*
});
$this->events->dispatch(new RouteMatched($route, $request));
return $this->prepareResponse($request,
$this->runRouteWithinStack($route, $request)
);
}
/**
* Run the given route within a Stack "onion" instance.
* @param \Illuminate\Http\Request $request
* @return \Symfony\Component\HttpFoundation\Response
*/
public function dispatchToRoute(Request $request)
{
return $this->runRoute($request, $this->findRoute($request));
}
/**
* Find the route matching a given request.
*
*/
public function dispatch(Request $request)
{
$this->currentRequest = $request;
return $this->dispatchToRoute($request);
}
/**
* Dispatch the request to a route and return the response.
*
protected function dispatchToRouter()
{
return function ($request) {
$this->app->instance('request', $request);
return $this->router->dispatch($request);
};
}
/**
* Call the terminate method on any terminable middleware.
*/
protected function prepareDestination(Closure $destination)
{
return function ($passable) use ($destination) {
try {
return $destination($passable);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
}
};
}
{
$id = Str::uuid()->toString();
$request->attributes->add(['request_id' => $id]);
$response = $next($request);
if ($response instanceof SymfonyResponse) {
$response->headers->set('X-Helpspot-Request-Id', $id, true);
}
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
$this->clean($request);
return $next($request);
}
/**
* Clean the request's data.
*
if ($callback($request)) {
return $next($request);
}
}
return parent::handle($request, $next);
}
/**
* Transform the given value.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
if ($max > 0 && $request->server('CONTENT_LENGTH') > $max) {
throw new PostTooLargeException;
}
return $next($request);
}
/**
* Determine the server 'post_max_size' as bytes.
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
*/
public function handle($request, Closure $next)
{
// Check if we're dealing with CORS and if we should handle it
if (! $this->shouldRun($request)) {
return $next($request);
}
// For Preflight, return the Preflight response
if ($this->cors->isPreflightRequest($request)) {
$response = $this->cors->handlePreflightRequest($request);
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
public function handle(Request $request, Closure $next)
{
$request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
$this->setTrustedProxyIpAddresses($request);
return $next($request);
}
/**
* Sets the trusted proxies on the request to the value of trustedproxy.proxies
*
// since the object we're given was already a fully instantiated object.
$parameters = [$passable, $stack];
}
$carry = method_exists($pipe, $this->method)
? $pipe->{$this->method}(...$parameters)
: $pipe(...$parameters);
return $this->handleCarry($carry);
} catch (Throwable $e) {
return $this->handleException($passable, $e);
{
$pipeline = array_reduce(
array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
);
return $pipeline($this->passable);
}
/**
* Run the pipeline and return the result.
*
$this->bootstrap();
return (new Pipeline($this->app))
->send($request)
->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
->then($this->dispatchToRouter());
}
/**
* Bootstrap the application for HTTP requests.
*
public function handle($request)
{
try {
$request->enableHttpMethodParameterOverride();
$response = $this->sendRequestThroughRouter($request);
} catch (Throwable $e) {
$this->reportException($e);
$response = $this->renderException($request, $e);
}
*/
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Error
|
---|
Error: Cannot use object of type Savant2_Error as array at /var/www/html/support/helpspot/public/custom_templates/forums.topics.tpl.php:9 at include() (/var/www/html/support/helpspot/public/custom_templates/index.tpl.php:66) at include('/var/www/html/support/helpspot/public/custom_templates/index.tpl.php') (/var/www/html/support/helpspot/helpspot/helpspot/lib/Savant2.php:1044) at Savant2->fetch() (/var/www/html/support/helpspot/helpspot/index.php:178) at require_once('/var/www/html/support/helpspot/helpspot/index.php') (/var/www/html/support/helpspot/routes/web.php:99) at HS\Providers\RouteServiceProvider->{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Route.php:238) at Illuminate\Routing\Route->runCallable() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Route.php:208) at Illuminate\Routing\Route->run() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Router.php:721) at Illuminate\Routing\Router->Illuminate\Routing\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/app/Http/Middleware/RedirectAdminDotPhp.php:25) at HS\Http\Middleware\RedirectAdminDotPhp->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/app/Http/Middleware/VerifyHelpspotInstalled.php:25) at HS\Http\Middleware\VerifyHelpspotInstalled->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php:50) at Illuminate\Routing\Middleware\SubstituteBindings->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:78) at Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php:49) at Illuminate\View\Middleware\ShareErrorsFromSession->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/app/Http/Middleware/CheckForMaintenanceMode.php:67) at HS\Http\Middleware\CheckForMaintenanceMode->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:121) at Illuminate\Session\Middleware\StartSession->handleStatefulRequest() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php:64) at Illuminate\Session\Middleware\StartSession->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php:37) at Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php:67) at Illuminate\Cookie\Middleware\EncryptCookies->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Router.php:723) at Illuminate\Routing\Router->runRouteWithinStack() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Router.php:698) at Illuminate\Routing\Router->runRoute() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Router.php:662) at Illuminate\Routing\Router->dispatchToRoute() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Routing/Router.php:651) at Illuminate\Routing\Router->dispatch() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:167) at Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:128) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/app/Http/Middleware/RequestGetsUniqueId.php:25) at HS\Http\Middleware\RequestGetsUniqueId->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31) at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21) at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40) at Illuminate\Foundation\Http\Middleware\TrimStrings->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27) at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/fruitcake/laravel-cors/src/HandleCors.php:38) at Fruitcake\Cors\HandleCors->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/fideloper/proxy/src/TrustProxies.php:57) at Fideloper\Proxy\TrustProxies->handle() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:167) at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:103) at Illuminate\Pipeline\Pipeline->then() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:142) at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() (/var/www/html/support/helpspot/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:111) at Illuminate\Foundation\Http\Kernel->handle() (/var/www/html/support/helpspot/public/index.php:62) |