ErrorException (E_ERROR)
Undefined variable: cpost (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php) (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php)
Previous exceptions
  • Undefined variable: cpost (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php) (0)
  • Undefined variable: cpost (8)
ErrorException thrown with message "Undefined variable: cpost (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php) (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php)" Stacktrace: #33 ErrorException in /home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php:6 #32 Illuminate\View\Engines\CompilerEngine:handleViewException in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php:45 #31 Illuminate\View\Engines\CompilerEngine:handleViewException in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php:45 #30 Whoops\Exception\ErrorException in /home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php:6 #29 Whoops\Run:handleError in /home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php:6 #28 include in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php:43 #27 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/CompilerEngine.php:59 #26 Illuminate\View\Engines\CompilerEngine:get in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:142 #25 Illuminate\View\View:getContents in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:125 #24 Illuminate\View\View:renderContents in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:90 #23 Illuminate\View\View:render in /home/forge/epilepsy.org.za/storage/views/370370ada4d260ea159e566602850ca27b05354f.php:13 #22 include in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php:43 #21 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/CompilerEngine.php:59 #20 Illuminate\View\Engines\CompilerEngine:get in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:142 #19 Illuminate\View\View:getContents in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:125 #18 Illuminate\View\View:renderContents in /home/forge/epilepsy.org.za/vendor/illuminate/view/View.php:90 #17 Illuminate\View\View:render in /home/forge/epilepsy.org.za/vendor/illuminate/http/Response.php:42 #16 Illuminate\Http\Response:setContent in /home/forge/epilepsy.org.za/vendor/symfony/http-foundation/Response.php:205 #15 Symfony\Component\HttpFoundation\Response:__construct in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:748 #14 Illuminate\Routing\Router:toResponse in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:720 #13 Illuminate\Routing\Router:prepareResponse in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:680 #12 Illuminate\Routing\Router:Illuminate\Routing\{closure} in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Pipeline.php:30 #11 Illuminate\Routing\Pipeline:Illuminate\Routing\{closure} in /home/forge/epilepsy.org.za/vendor/illuminate/pipeline/Pipeline.php:104 #10 Illuminate\Pipeline\Pipeline:then in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:682 #9 Illuminate\Routing\Router:runRouteWithinStack in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:657 #8 Illuminate\Routing\Router:runRoute in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:623 #7 Illuminate\Routing\Router:dispatchToRoute in /home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php:612 #6 Illuminate\Routing\Router:dispatch in /home/forge/epilepsy.org.za/htdocs/content/mu-plugins/themosis-framework/themosis.php:292 #5 Themosis:setRouter in /home/forge/epilepsy.org.za/htdocs/cms/wp-includes/class-wp-hook.php:292 #4 WP_Hook:apply_filters in /home/forge/epilepsy.org.za/htdocs/cms/wp-includes/class-wp-hook.php:316 #3 WP_Hook:do_action in /home/forge/epilepsy.org.za/htdocs/cms/wp-includes/plugin.php:484 #2 do_action in /home/forge/epilepsy.org.za/htdocs/cms/wp-includes/template-loader.php:13 #1 require_once in /home/forge/epilepsy.org.za/htdocs/cms/wp-blog-header.php:19 #0 require in /home/forge/epilepsy.org.za/htdocs/index.php:11
Stack frames (34)
33
ErrorException
/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php6
32
Illuminate\View\Engines\CompilerEngine handleViewException
/vendor/illuminate/view/Engines/PhpEngine.php45
31
Illuminate\View\Engines\CompilerEngine handleViewException
/vendor/illuminate/view/Engines/PhpEngine.php45
30
Whoops\Exception\ErrorException
/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php6
29
Whoops\Run handleError
/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php6
28
include
/vendor/illuminate/view/Engines/PhpEngine.php43
27
Illuminate\View\Engines\PhpEngine evaluatePath
/vendor/illuminate/view/Engines/CompilerEngine.php59
26
Illuminate\View\Engines\CompilerEngine get
/vendor/illuminate/view/View.php142
25
Illuminate\View\View getContents
/vendor/illuminate/view/View.php125
24
Illuminate\View\View renderContents
/vendor/illuminate/view/View.php90
23
Illuminate\View\View render
/storage/views/370370ada4d260ea159e566602850ca27b05354f.php13
22
include
/vendor/illuminate/view/Engines/PhpEngine.php43
21
Illuminate\View\Engines\PhpEngine evaluatePath
/vendor/illuminate/view/Engines/CompilerEngine.php59
20
Illuminate\View\Engines\CompilerEngine get
/vendor/illuminate/view/View.php142
19
Illuminate\View\View getContents
/vendor/illuminate/view/View.php125
18
Illuminate\View\View renderContents
/vendor/illuminate/view/View.php90
17
Illuminate\View\View render
/vendor/illuminate/http/Response.php42
16
Illuminate\Http\Response setContent
/vendor/symfony/http-foundation/Response.php205
15
Symfony\Component\HttpFoundation\Response __construct
/vendor/illuminate/routing/Router.php748
14
Illuminate\Routing\Router toResponse
/vendor/illuminate/routing/Router.php720
13
Illuminate\Routing\Router prepareResponse
/vendor/illuminate/routing/Router.php680
12
Illuminate\Routing\Router Illuminate\Routing\{closure}
/vendor/illuminate/routing/Pipeline.php30
11
Illuminate\Routing\Pipeline Illuminate\Routing\{closure}
/vendor/illuminate/pipeline/Pipeline.php104
10
Illuminate\Pipeline\Pipeline then
/vendor/illuminate/routing/Router.php682
9
Illuminate\Routing\Router runRouteWithinStack
/vendor/illuminate/routing/Router.php657
8
Illuminate\Routing\Router runRoute
/vendor/illuminate/routing/Router.php623
7
Illuminate\Routing\Router dispatchToRoute
/vendor/illuminate/routing/Router.php612
6
Illuminate\Routing\Router dispatch
/htdocs/content/mu-plugins/themosis-framework/themosis.php292
5
Themosis setRouter
/htdocs/cms/wp-includes/class-wp-hook.php292
4
WP_Hook apply_filters
/htdocs/cms/wp-includes/class-wp-hook.php316
3
WP_Hook do_action
/htdocs/cms/wp-includes/plugin.php484
2
do_action
/htdocs/cms/wp-includes/template-loader.php13
1
require_once
/htdocs/cms/wp-blog-header.php19
0
require
/htdocs/index.php11
/home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php
<?php if(isset($title)): ?><?php echo $title; ?><?php endif; ?>
<?php if(isset($subtitle)): ?><?php echo $subtitle; ?><?php endif; ?>
<?php if(isset($content)): ?><?php echo wpautop($content); ?><?php endif; ?>
 
<?php
    $id = Meta::get($cpost->ID, 'id');
    $images = \Theme\Controllers\PagesController::get_gallery_images($cpost->ID);
?>
 
<div class="row">
    <?php $__currentLoopData = $images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="col-md-4 col-6">
            <div class="image-frame mb-4">
                <a href="<?php echo e($img['src']); ?>" data-fancybox="gallery-<?php echo e($id); ?>"><img class="img-fluid"src="<?php echo e($img['src']); ?>" /></a>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div><?php /**PATH /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php ENDPATH**/ ?>
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php
     *
     * @param  string  $__path
     * @param  array   $__data
     * @return string
     */
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        extract($__data, EXTR_SKIP);
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            include $__path;
        } catch (Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (Throwable $e) {
            $this->handleViewException(new FatalThrowableError($e), $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
        while (ob_get_level() > $obLevel) {
            ob_end_clean();
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php
     *
     * @param  string  $__path
     * @param  array   $__data
     * @return string
     */
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        extract($__data, EXTR_SKIP);
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            include $__path;
        } catch (Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (Throwable $e) {
            $this->handleViewException(new FatalThrowableError($e), $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
        while (ob_get_level() > $obLevel) {
            ob_end_clean();
Exception message: Undefined variable: cpost (View: /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php)
/home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php
<?php if(isset($title)): ?><?php echo $title; ?><?php endif; ?>
<?php if(isset($subtitle)): ?><?php echo $subtitle; ?><?php endif; ?>
<?php if(isset($content)): ?><?php echo wpautop($content); ?><?php endif; ?>
 
<?php
    $id = Meta::get($cpost->ID, 'id');
    $images = \Theme\Controllers\PagesController::get_gallery_images($cpost->ID);
?>
 
<div class="row">
    <?php $__currentLoopData = $images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="col-md-4 col-6">
            <div class="image-frame mb-4">
                <a href="<?php echo e($img['src']); ?>" data-fancybox="gallery-<?php echo e($id); ?>"><img class="img-fluid"src="<?php echo e($img['src']); ?>" /></a>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div><?php /**PATH /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php ENDPATH**/ ?>
Exception message: Undefined variable: cpost
/home/forge/epilepsy.org.za/storage/views/8169c2f5c9b48d666170d7331a88a6861e0c56e5.php
<?php if(isset($title)): ?><?php echo $title; ?><?php endif; ?>
<?php if(isset($subtitle)): ?><?php echo $subtitle; ?><?php endif; ?>
<?php if(isset($content)): ?><?php echo wpautop($content); ?><?php endif; ?>
 
<?php
    $id = Meta::get($cpost->ID, 'id');
    $images = \Theme\Controllers\PagesController::get_gallery_images($cpost->ID);
?>
 
<div class="row">
    <?php $__currentLoopData = $images; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $img): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="col-md-4 col-6">
            <div class="image-frame mb-4">
                <a href="<?php echo e($img['src']); ?>" data-fancybox="gallery-<?php echo e($id); ?>"><img class="img-fluid"src="<?php echo e($img['src']); ?>" /></a>
            </div>
        </div>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div><?php /**PATH /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/components/gallery.blade.php ENDPATH**/ ?>
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $__path
     * @param  array   $__data
     * @return string
     */
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        extract($__data, EXTR_SKIP);
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            include $__path;
        } catch (Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (Throwable $e) {
            $this->handleViewException(new FatalThrowableError($e), $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/CompilerEngine.php
     * @param  array   $data
     * @return string
     */
    public function get($path, array $data = [])
    {
        $this->lastCompiled[] = $path;
 
        // If this given view has expired, which means it has simply been edited since
        // it was last compiled, we will re-compile the views so we can evaluate a
        // fresh copy of the view. We'll pass the compiler the path of the view.
        if ($this->compiler->isExpired($path)) {
            $this->compiler->compile($path);
        }
 
        $compiled = $this->compiler->getCompiledPath($path);
 
        // Once we have the path to the compiled file, we will evaluate the paths with
        // typical PHP just like any other templates. We also keep a stack of views
        // which have been rendered for right exception messages to be generated.
        $results = $this->evaluatePath($compiled, $data);
 
        array_pop($this->lastCompiled);
 
        return $results;
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
        $e = new ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);
 
        parent::handleViewException($e, $obLevel);
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
     * Get the data bound to the view instance.
     *
     * @return array
     */
    public function gatherData()
    {
        $data = array_merge($this->factory->getShared(), $this->data);
 
        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            }
        }
 
        return $data;
    }
 
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
     */
    protected function renderContents()
    {
        // We will keep track of the amount of views being rendered so we can flush
        // the section after the complete rendering operation is done. This will
        // clear out the sections for any separate views that may be rendered.
        $this->factory->incrementRender();
 
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
        $this->view = $view;
        $this->path = $path;
        $this->engine = $engine;
        $this->factory = $factory;
 
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
 
    /**
     * Get the string contents of the view.
     *
     * @param  callable|null  $callback
     * @return array|string
     *
     * @throws \Throwable
     */
    public function render(callable $callback = null)
    {
        try {
            $contents = $this->renderContents();
 
            $response = isset($callback) ? call_user_func($callback, $this, $contents) : null;
 
            // Once we have the contents of the view, we will flush the sections if we are
            // done rendering all views so that there is nothing left hanging over when
            // another view gets rendered in the future by the application developer.
            $this->factory->flushStateIfDoneRendering();
 
            return ! is_null($response) ? $response : $contents;
        } catch (Exception $e) {
            $this->factory->flushState();
 
            throw $e;
        } catch (Throwable $e) {
            $this->factory->flushState();
 
            throw $e;
        }
    }
 
/home/forge/epilepsy.org.za/storage/views/370370ada4d260ea159e566602850ca27b05354f.php
<?php $__env->startSection('page'); ?>
    <?php echo $__env->make('includes.full-image-header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    
    <div class="bg-white component component-gallery-<?php echo e($post->ID); ?> component-gallery">
        <div class="container">
            <div class="component-inner">
                <h1 class="mb-4">
                    Photo Gallery
                    <small><?php echo e($post->post_title); ?></small>
                </h1>
                <?php echo wpautop($post->post_content); ?>
 
                <?php echo $__env->make('components.gallery', ['gallery' => $post], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/forge/epilepsy.org.za/htdocs/content/themes/ai/resources/views/gallery.blade.php ENDPATH**/ ?>
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/PhpEngine.php
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $__path
     * @param  array   $__data
     * @return string
     */
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        extract($__data, EXTR_SKIP);
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            include $__path;
        } catch (Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (Throwable $e) {
            $this->handleViewException(new FatalThrowableError($e), $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
/home/forge/epilepsy.org.za/vendor/illuminate/view/Engines/CompilerEngine.php
     * @param  array   $data
     * @return string
     */
    public function get($path, array $data = [])
    {
        $this->lastCompiled[] = $path;
 
        // If this given view has expired, which means it has simply been edited since
        // it was last compiled, we will re-compile the views so we can evaluate a
        // fresh copy of the view. We'll pass the compiler the path of the view.
        if ($this->compiler->isExpired($path)) {
            $this->compiler->compile($path);
        }
 
        $compiled = $this->compiler->getCompiledPath($path);
 
        // Once we have the path to the compiled file, we will evaluate the paths with
        // typical PHP just like any other templates. We also keep a stack of views
        // which have been rendered for right exception messages to be generated.
        $results = $this->evaluatePath($compiled, $data);
 
        array_pop($this->lastCompiled);
 
        return $results;
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Exception  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Exception
     */
    protected function handleViewException(Exception $e, $obLevel)
    {
        $e = new ErrorException($this->getMessage($e), 0, 1, $e->getFile(), $e->getLine(), $e);
 
        parent::handleViewException($e, $obLevel);
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
     * Get the data bound to the view instance.
     *
     * @return array
     */
    public function gatherData()
    {
        $data = array_merge($this->factory->getShared(), $this->data);
 
        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            }
        }
 
        return $data;
    }
 
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
     */
    protected function renderContents()
    {
        // We will keep track of the amount of views being rendered so we can flush
        // the section after the complete rendering operation is done. This will
        // clear out the sections for any separate views that may be rendered.
        $this->factory->incrementRender();
 
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
/home/forge/epilepsy.org.za/vendor/illuminate/view/View.php
        $this->view = $view;
        $this->path = $path;
        $this->engine = $engine;
        $this->factory = $factory;
 
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
 
    /**
     * Get the string contents of the view.
     *
     * @param  callable|null  $callback
     * @return array|string
     *
     * @throws \Throwable
     */
    public function render(callable $callback = null)
    {
        try {
            $contents = $this->renderContents();
 
            $response = isset($callback) ? call_user_func($callback, $this, $contents) : null;
 
            // Once we have the contents of the view, we will flush the sections if we are
            // done rendering all views so that there is nothing left hanging over when
            // another view gets rendered in the future by the application developer.
            $this->factory->flushStateIfDoneRendering();
 
            return ! is_null($response) ? $response : $contents;
        } catch (Exception $e) {
            $this->factory->flushState();
 
            throw $e;
        } catch (Throwable $e) {
            $this->factory->flushState();
 
            throw $e;
        }
    }
 
/home/forge/epilepsy.org.za/vendor/illuminate/http/Response.php
     * @return $this
     */
    public function setContent($content)
    {
        $this->original = $content;
 
        // If the content is "JSONable" we will set the appropriate header and convert
        // the content to JSON. This is useful when returning something like models
        // from routes that will be automatically transformed to their JSON form.
        if ($this->shouldBeJson($content)) {
            $this->header('Content-Type', 'application/json');
 
            $content = $this->morphToJson($content);
        }
 
        // If this content implements the "Renderable" interface then we will call the
        // render method on the object so we will avoid any "__toString" exceptions
        // that might be thrown and have their errors obscured by PHP's handling.
        elseif ($content instanceof Renderable) {
            $content = $content->render();
        }
 
        parent::setContent($content);
 
        return $this;
    }
 
    /**
     * Determine if the given content should be turned into JSON.
     *
     * @param  mixed  $content
     * @return bool
     */
    protected function shouldBeJson($content)
    {
        return $content instanceof Arrayable ||
               $content instanceof Jsonable ||
               $content instanceof ArrayObject ||
               $content instanceof JsonSerializable ||
               is_array($content);
/home/forge/epilepsy.org.za/vendor/symfony/http-foundation/Response.php
        500 => 'Internal Server Error',
        501 => 'Not Implemented',
        502 => 'Bad Gateway',
        503 => 'Service Unavailable',
        504 => 'Gateway Timeout',
        505 => 'HTTP Version Not Supported',
        506 => 'Variant Also Negotiates',                                     // RFC2295
        507 => 'Insufficient Storage',                                        // RFC4918
        508 => 'Loop Detected',                                               // RFC5842
        510 => 'Not Extended',                                                // RFC2774
        511 => 'Network Authentication Required',                             // RFC6585
    ];
 
    /**
     * @throws \InvalidArgumentException When the HTTP status code is not valid
     */
    public function __construct($content = '', int $status = 200, array $headers = [])
    {
        $this->headers = new ResponseHeaderBag($headers);
        $this->setContent($content);
        $this->setStatusCode($status);
        $this->setProtocolVersion('1.0');
    }
 
    /**
     * Factory method for chainability.
     *
     * Example:
     *
     *     return Response::create($body, 200)
     *         ->setSharedMaxAge(300);
     *
     * @param mixed $content The response content, see setContent()
     * @param int   $status  The response status code
     * @param array $headers An array of response headers
     *
     * @return static
     */
    public static function create($content = '', $status = 200, $headers = [])
    {
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
     */
    public static function toResponse($request, $response)
    {
        if ($response instanceof Responsable) {
            $response = $response->toResponse($request);
        }
 
        if ($response instanceof PsrResponseInterface) {
            $response = (new HttpFoundationFactory)->createResponse($response);
        } elseif ($response instanceof Model && $response->wasRecentlyCreated) {
            $response = new JsonResponse($response, 201);
        } elseif (! $response instanceof SymfonyResponse &&
                   ($response instanceof Arrayable ||
                    $response instanceof Jsonable ||
                    $response instanceof ArrayObject ||
                    $response instanceof JsonSerializable ||
                    is_array($response))) {
            $response = new JsonResponse($response);
        } elseif (! $response instanceof SymfonyResponse) {
            $response = new Response($response);
        }
 
        if ($response->getStatusCode() === Response::HTTP_NOT_MODIFIED) {
            $response->setNotModified();
        }
 
        return $response->prepare($request);
    }
 
    /**
     * Substitute the route bindings onto the route.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @return \Illuminate\Routing\Route
     *
     * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
     */
    public function substituteBindings($route)
    {
        foreach ($route->parameters() as $key => $value) {
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
     * Sort the given middleware by priority.
     *
     * @param  \Illuminate\Support\Collection  $middlewares
     * @return array
     */
    protected function sortMiddleware(Collection $middlewares)
    {
        return (new SortedMiddleware($this->middlewarePriority, $middlewares))->all();
    }
 
    /**
     * Create a response instance from the given value.
     *
     * @param  \Symfony\Component\HttpFoundation\Request  $request
     * @param  mixed  $response
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function prepareResponse($request, $response)
    {
        return static::toResponse($request, $response);
    }
 
    /**
     * Static version of prepareResponse.
     *
     * @param  \Symfony\Component\HttpFoundation\Request  $request
     * @param  mixed  $response
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public static function toResponse($request, $response)
    {
        if ($response instanceof Responsable) {
            $response = $response->toResponse($request);
        }
 
        if ($response instanceof PsrResponseInterface) {
            $response = (new HttpFoundationFactory)->createResponse($response);
        } elseif ($response instanceof Model && $response->wasRecentlyCreated) {
            $response = new JsonResponse($response, 201);
        } elseif (! $response instanceof SymfonyResponse &&
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
    /**
     * Run the given route within a Stack "onion" instance.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @param  \Illuminate\Http\Request  $request
     * @return mixed
     */
    protected function runRouteWithinStack(Route $route, Request $request)
    {
        $shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
                                $this->container->make('middleware.disable') === true;
 
        $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
 
        return (new Pipeline($this->container))
                        ->send($request)
                        ->through($middleware)
                        ->then(function ($request) use ($route) {
                            return $this->prepareResponse(
                                $request, $route->run()
                            );
                        });
    }
 
    /**
     * Gather the middleware for the given route with resolved class names.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @return array
     */
    public function gatherRouteMiddleware(Route $route)
    {
        $middleware = collect($route->gatherMiddleware())->map(function ($name) {
            return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
        })->flatten();
 
        return $this->sortMiddleware($middleware);
    }
 
    /**
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Pipeline.php
use Symfony\Component\Debug\Exception\FatalThrowableError;
 
/**
 * This extended pipeline catches any exceptions that occur during each slice.
 *
 * The exceptions are converted to HTTP responses for proper middleware handling.
 */
class Pipeline extends BasePipeline
{
    /**
     * Get the final piece of the Closure onion.
     *
     * @param  \Closure  $destination
     * @return \Closure
     */
    protected function prepareDestination(Closure $destination)
    {
        return function ($passable) use ($destination) {
            try {
                return $destination($passable);
            } catch (Exception $e) {
                return $this->handleException($passable, $e);
            } catch (Throwable $e) {
                return $this->handleException($passable, new FatalThrowableError($e));
            }
        };
    }
 
    /**
     * Get a Closure that represents a slice of the application onion.
     *
     * @return \Closure
     */
    protected function carry()
    {
        return function ($stack, $pipe) {
            return function ($passable) use ($stack, $pipe) {
                try {
                    $slice = parent::carry();
 
/home/forge/epilepsy.org.za/vendor/illuminate/pipeline/Pipeline.php
    public function via($method)
    {
        $this->method = $method;
 
        return $this;
    }
 
    /**
     * Run the pipeline with a final destination callback.
     *
     * @param  \Closure  $destination
     * @return mixed
     */
    public function then(Closure $destination)
    {
        $pipeline = array_reduce(
            array_reverse($this->pipes), $this->carry(), $this->prepareDestination($destination)
        );
 
        return $pipeline($this->passable);
    }
 
    /**
     * Run the pipeline and return the result.
     *
     * @return mixed
     */
    public function thenReturn()
    {
        return $this->then(function ($passable) {
            return $passable;
        });
    }
 
    /**
     * Get the final piece of the Closure onion.
     *
     * @param  \Closure  $destination
     * @return \Closure
     */
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
     *
     * @param  \Illuminate\Routing\Route  $route
     * @param  \Illuminate\Http\Request  $request
     * @return mixed
     */
    protected function runRouteWithinStack(Route $route, Request $request)
    {
        $shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
                                $this->container->make('middleware.disable') === true;
 
        $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
 
        return (new Pipeline($this->container))
                        ->send($request)
                        ->through($middleware)
                        ->then(function ($request) use ($route) {
                            return $this->prepareResponse(
                                $request, $route->run()
                            );
                        });
    }
 
    /**
     * Gather the middleware for the given route with resolved class names.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @return array
     */
    public function gatherRouteMiddleware(Route $route)
    {
        $middleware = collect($route->gatherMiddleware())->map(function ($name) {
            return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups);
        })->flatten();
 
        return $this->sortMiddleware($middleware);
    }
 
    /**
     * Sort the given middleware by priority.
     *
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
        return $route;
    }
 
    /**
     * Return the response for the given route.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Illuminate\Routing\Route  $route
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    protected function runRoute(Request $request, Route $route)
    {
        $request->setRouteResolver(function () use ($route) {
            return $route;
        });
 
        $this->events->dispatch(new Events\RouteMatched($route, $request));
 
        return $this->prepareResponse($request,
            $this->runRouteWithinStack($route, $request)
        );
    }
 
    /**
     * Run the given route within a Stack "onion" instance.
     *
     * @param  \Illuminate\Routing\Route  $route
     * @param  \Illuminate\Http\Request  $request
     * @return mixed
     */
    protected function runRouteWithinStack(Route $route, Request $request)
    {
        $shouldSkipMiddleware = $this->container->bound('middleware.disable') &&
                                $this->container->make('middleware.disable') === true;
 
        $middleware = $shouldSkipMiddleware ? [] : $this->gatherRouteMiddleware($route);
 
        return (new Pipeline($this->container))
                        ->send($request)
                        ->through($middleware)
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function dispatch(Request $request)
    {
        $this->currentRequest = $request;
 
        return $this->dispatchToRoute($request);
    }
 
    /**
     * Dispatch the request to a route and return the response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function dispatchToRoute(Request $request)
    {
        return $this->runRoute($request, $this->findRoute($request));
    }
 
    /**
     * Find the route matching a given request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Routing\Route
     */
    protected function findRoute($request)
    {
        $this->current = $route = $this->routes->match($request);
 
        $this->container->instance(Route::class, $route);
 
        return $route;
    }
 
    /**
     * Return the response for the given route.
     *
/home/forge/epilepsy.org.za/vendor/illuminate/routing/Router.php
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function respondWithRoute($name)
    {
        $route = tap($this->routes->getByName($name))->bind($this->currentRequest);
 
        return $this->runRoute($this->currentRequest, $route);
    }
 
    /**
     * Dispatch the request to the application.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function dispatch(Request $request)
    {
        $this->currentRequest = $request;
 
        return $this->dispatchToRoute($request);
    }
 
    /**
     * Dispatch the request to a route and return the response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
     */
    public function dispatchToRoute(Request $request)
    {
        return $this->runRoute($request, $this->findRoute($request));
    }
 
    /**
     * Find the route matching a given request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Routing\Route
     */
    protected function findRoute($request)
/home/forge/epilepsy.org.za/htdocs/content/mu-plugins/themosis-framework/themosis.php
             * Register framework assets.
             */
            $this->container['asset']->add('themosis-core-styles', 'css/_themosisCore.css', ['wp-color-picker'])->to('admin');
            $this->container['asset']->add('themosis-core-scripts', 'js/_themosisCore.js', ['jquery', 'jquery-ui-sortable', 'underscore', 'backbone', 'mce-view', 'wp-color-picker'], '1.3.0', true)->to('admin');
        }
 
        /**
         * Hook into front-end routing.
         * Setup the router API to be executed before
         * theme default templates.
         */
        public function setRouter()
        {
            if (is_feed() || is_comment_feed()) {
                return;
            }
 
            try {
                $request = $this->container['request'];
                $response = $this->container['router']->dispatch($request);
 
                // We only send back the content because, headers are already defined
                // by WordPress internals.
                $response->sendContent();
            } catch (\Symfony\Component\HttpKernel\Exception\NotFoundHttpException $exception) {
                /*
                 * Fallback to WordPress templates.
                 */
            }
        }
 
        /**
         * Enqueue Admin scripts.
         */
        public function adminEnqueueScripts()
        {
            /*
             * Make sure the media scripts are always enqueued.
             */
            wp_enqueue_media();
/home/forge/epilepsy.org.za/htdocs/cms/wp-includes/class-wp-hook.php
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $num_args                           = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
            $priority                                 = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 == $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/home/forge/epilepsy.org.za/htdocs/cms/wp-includes/class-wp-hook.php
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        $this->nesting_level--;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
     */
    public function do_action( $args ) {
        $this->doing_action = true;
        $this->apply_filters( '', $args );
 
        // If there are recursive calls to the current action, we haven't finished it until we get to the last one.
        if ( ! $this->nesting_level ) {
            $this->doing_action = false;
        }
    }
 
    /**
     * Processes the functions hooked into the 'all' hook.
     *
     * @since 4.7.0
     *
     * @param array $args Arguments to pass to the hook callbacks. Passed by reference.
     */
    public function do_all_hook( &$args ) {
        $nesting_level                      = $this->nesting_level++;
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
/home/forge/epilepsy.org.za/htdocs/cms/wp-includes/plugin.php
 
    if ( ! isset( $wp_filter[ $tag ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $tag;
    }
 
    if ( empty( $arg ) ) {
        $arg[] = '';
    } elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
        // Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
        $arg[0] = $arg[0][0];
    }
 
    $wp_filter[ $tag ]->do_action( $arg );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Retrieve the number of times an action is fired.
 *
 * @since 2.1.0
 *
 * @global int[] $wp_actions Stores the number of times each action was triggered.
 *
 * @param string $tag The name of the action hook.
 * @return int The number of times action hook $tag is fired.
 */
function did_action( $tag ) {
    global $wp_actions;
 
    if ( ! isset( $wp_actions[ $tag ] ) ) {
        return 0;
    }
/home/forge/epilepsy.org.za/htdocs/cms/wp-includes/template-loader.php
<?php
/**
 * Loads the correct template based on the visitor's url
 *
 * @package WordPress
 */
if ( wp_using_themes() ) {
    /**
     * Fires before determining which template to load.
     *
     * @since 1.5.0
     */
    do_action( 'template_redirect' );
}
 
/**
 * Filters whether to allow 'HEAD' requests to generate content.
 *
 * Provides a significant performance bump by exiting before the page
 * content loads for 'HEAD' requests. See #14348.
 *
 * @since 3.5.0
 *
 * @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
 */
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {
    exit;
}
 
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) {
    /**
     * Fired when the template loader determines a robots.txt request.
     *
     * @since 2.1.0
     */
    do_action( 'do_robots' );
    return;
} elseif ( is_favicon() ) {
    /**
/home/forge/epilepsy.org.za/htdocs/cms/wp-blog-header.php
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}
 
/home/forge/epilepsy.org.za/htdocs/index.php
<?php
 
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
 
/** Loads the WordPress Environment and Template */
require dirname(__FILE__).'/cms/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.15.8
REQUEST_URI /galleries/header-slider/
USER forge
HOME /home/forge
HTTP_CONNECTION Keep-Alive
HTTP_HOST epilepsy.org.za
HTTP_ACCEPT_ENCODING br,gzip
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS 200
HTTPS on
SERVER_NAME epilepsy.org.za
SERVER_PORT 443
SERVER_ADDR 157.230.9.91
REMOTE_PORT 54036
REMOTE_ADDR 3.236.212.116
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /home/forge/epilepsy.org.za/htdocs
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
SCRIPT_FILENAME /home/forge/epilepsy.org.za/htdocs/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1632790740.4201
REQUEST_TIME 1632790740
DB_NAME epilepsy_org_za
DB_USER forge
DB_PASSWORD eA5Dx2qO4WUrXFr94Rf5
DB_HOST localhost
WP_HOME http://epilepsy.org.za
WP_SITEURL http://epilepsy.org.za/cms
Key Value
DB_NAME epilepsy_org_za
DB_USER forge
DB_PASSWORD eA5Dx2qO4WUrXFr94Rf5
DB_HOST localhost
WP_HOME http://epilepsy.org.za
WP_SITEURL http://epilepsy.org.za/cms
0. Whoops\Handler\PrettyPageHandler