Whoops \ Exception \ ErrorException (E_WARNING)
Trying to access array offset on value of type bool Whoops\Exception\ErrorException thrown with message "Trying to access array offset on value of type bool" Stacktrace: #24 Whoops\Exception\ErrorException in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php:91 #23 Whoops\Run:handleError in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php:91 #22 AWsite\ContentBlocks\Blocks\SlideshowBlock:getBasicSlideshow in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php:59 #21 AWsite\ContentBlocks\Blocks\SlideshowBlock:getDataFromAcfGroup in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php:44 #20 AWsite\ContentBlocks\Blocks\SlideshowBlock:output in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/class-wp-hook.php:324 #19 WP_Hook:apply_filters in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/class-wp-hook.php:348 #18 WP_Hook:do_action in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/plugin.php:517 #17 do_action in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/themes/awsite/single-hole.php:19 #16 include in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/template-loader.php:106 #15 require_once in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-blog-header.php:19 #14 include_once in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/index.php:60 #13 {closure} in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php:102 #12 call_user_func in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php:102 #11 Mindgruve\ReverseProxy\Adapters\GenericAdapter:bootstrap in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php:74 #10 Mindgruve\ReverseProxy\CachedReverseProxy:bootstrap in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php:91 #9 Mindgruve\ReverseProxy\CachedReverseProxy:buildResponse in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php:135 #8 Symfony\Component\HttpKernel\HttpKernel:handleRaw in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php:57 #7 Symfony\Component\HttpKernel\HttpKernel:handle in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:89 #6 Symfony\Component\HttpKernel\HttpCache\SubRequestHandler:handle in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php:472 #5 Symfony\Component\HttpKernel\HttpCache\HttpCache:forward in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php:447 #4 Symfony\Component\HttpKernel\HttpCache\HttpCache:fetch in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php:343 #3 Symfony\Component\HttpKernel\HttpCache\HttpCache:lookup in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php:209 #2 Symfony\Component\HttpKernel\HttpCache\HttpCache:handle in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/Artworking/Cache/CachedReverseProxy.php:51 #1 Artworking\Cache\CachedReverseProxy:buildAndCacheResponse in /var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php:40 #0 Mindgruve\ReverseProxy\CachedReverseProxy:run in /var/www/vhosts/worksopgolfclub.com/httpdocs/site/index.php:68
Stack frames (25)
24
Whoops\Exception\ErrorException
/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php91
23
Whoops\Run handleError
/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php91
22
AWsite\ContentBlocks\Blocks\SlideshowBlock getBasicSlideshow
/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php59
21
AWsite\ContentBlocks\Blocks\SlideshowBlock getDataFromAcfGroup
/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php44
20
AWsite\ContentBlocks\Blocks\SlideshowBlock output
/site/wp/wp-includes/class-wp-hook.php324
19
WP_Hook apply_filters
/site/wp/wp-includes/class-wp-hook.php348
18
WP_Hook do_action
/site/wp/wp-includes/plugin.php517
17
do_action
/site/wp-content/themes/awsite/single-hole.php19
16
include
/site/wp/wp-includes/template-loader.php106
15
require_once
/site/wp/wp-blog-header.php19
14
include_once
/site/index.php60
13
{closure}
/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php102
12
call_user_func
/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php102
11
Mindgruve\ReverseProxy\Adapters\GenericAdapter bootstrap
/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php74
10
Mindgruve\ReverseProxy\CachedReverseProxy bootstrap
/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php91
9
Mindgruve\ReverseProxy\CachedReverseProxy buildResponse
/vendor/symfony/http-kernel/HttpKernel.php135
8
Symfony\Component\HttpKernel\HttpKernel handleRaw
/vendor/symfony/http-kernel/HttpKernel.php57
7
Symfony\Component\HttpKernel\HttpKernel handle
/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php89
6
Symfony\Component\HttpKernel\HttpCache\SubRequestHandler handle
/vendor/symfony/http-kernel/HttpCache/HttpCache.php472
5
Symfony\Component\HttpKernel\HttpCache\HttpCache forward
/vendor/symfony/http-kernel/HttpCache/HttpCache.php447
4
Symfony\Component\HttpKernel\HttpCache\HttpCache fetch
/vendor/symfony/http-kernel/HttpCache/HttpCache.php343
3
Symfony\Component\HttpKernel\HttpCache\HttpCache lookup
/vendor/symfony/http-kernel/HttpCache/HttpCache.php209
2
Symfony\Component\HttpKernel\HttpCache\HttpCache handle
/site/wp-content/mu-plugins/AWsite/lib/Artworking/Cache/CachedReverseProxy.php51
1
Artworking\Cache\CachedReverseProxy buildAndCacheResponse
/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php40
0
Mindgruve\ReverseProxy\CachedReverseProxy run
/site/index.php68
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php
     *
     * @param $postId
     * @return array
     */
    private static function getBasicSlideshow($postId)
    {
        $data = [
            'slides' => []
        ];
 
        $slideshow = get_field('basic_slideshow', $postId);
 
        if (!$slideshow) {
            return $data;
        }
 
        foreach ($slideshow as $slide) {
            $data['slides'][] = [
                'image' => [
                    'highres' => $slide['image']['sizes']['fullscreen'],
                    'lowres' => $slide['image']['sizes']['fullscreen-lowres']
                ]
            ];
        }
 
        return $data;
    }
 
    /**
     * ACF group - Standard slideshow
     *
     * @param $postId
     * @return array
     */
    private static function getStandardSlideshow($postId)
    {
        $data = [
            'slides' => [],
            'video' => []
        ];
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php
     *
     * @param $postId
     * @return array
     */
    private static function getBasicSlideshow($postId)
    {
        $data = [
            'slides' => []
        ];
 
        $slideshow = get_field('basic_slideshow', $postId);
 
        if (!$slideshow) {
            return $data;
        }
 
        foreach ($slideshow as $slide) {
            $data['slides'][] = [
                'image' => [
                    'highres' => $slide['image']['sizes']['fullscreen'],
                    'lowres' => $slide['image']['sizes']['fullscreen-lowres']
                ]
            ];
        }
 
        return $data;
    }
 
    /**
     * ACF group - Standard slideshow
     *
     * @param $postId
     * @return array
     */
    private static function getStandardSlideshow($postId)
    {
        $data = [
            'slides' => [],
            'video' => []
        ];
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php
        $postId = isset($args['post_id'])
            ? $args['post_id']
            : thePostID();
 
        $data = self::getDataFromAcfGroup($postId, $args);
 
        // Allows adding extra classes to slideshow
        $classes = isset($args['classes']) ? $args['classes'] : '';
 
        // Render slideshow
        self::getTemplateRenderer()->render(sprintf('parts/slideshow-concrete/%s.php', $args['render_type']), [
            'data' => $data,
            'classes' => $classes
        ]);
    }
 
    private static function getDataFromAcfGroup($postId, $args)
    {
        if ($args['acf_group'] === self::ACF_GROUP_BASIC) {
            return self::getBasicSlideshow($postId);
        } else if ($args['acf_group'] === self::ACF_GROUP_STANDARD) {
            return self::getStandardSlideshow($postId);
        } else if ($args['acf_group'] === self::ACF_GROUP_FLEXIBLE_CONTENT) {
            return self::getFlexibleContentSlideshow($args['acf_data']);
        }
 
        return [];
    }
 
 
    /**
     * ACF group - Basic slideshow
     *
     * @param $postId
     * @return array
     */
    private static function getBasicSlideshow($postId)
    {
        $data = [
            'slides' => []
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/AWsite/ContentBlocks/Blocks/SlideshowBlock.php
    // Default arguments
    private static $defaultArgs = [
        'post_id' => null,
        'acf_data' => null
    ];
 
    public static function registerActions()
    {
        add_action('aw_slideshow', array('AWsite\\ContentBlocks\\Blocks\\SlideshowBlock', 'output'), 10);
    }
 
    public static function output($args = array())
    {
        $args = array_merge(self::$defaultArgs, $args);
 
        $postId = isset($args['post_id'])
            ? $args['post_id']
            : thePostID();
 
        $data = self::getDataFromAcfGroup($postId, $args);
 
        // Allows adding extra classes to slideshow
        $classes = isset($args['classes']) ? $args['classes'] : '';
 
        // Render slideshow
        self::getTemplateRenderer()->render(sprintf('parts/slideshow-concrete/%s.php', $args['render_type']), [
            'data' => $data,
            'classes' => $classes
        ]);
    }
 
    private static function getDataFromAcfGroup($postId, $args)
    {
        if ($args['acf_group'] === self::ACF_GROUP_BASIC) {
            return self::getBasicSlideshow($postId);
        } else if ($args['acf_group'] === self::ACF_GROUP_STANDARD) {
            return self::getStandardSlideshow($postId);
        } else if ($args['acf_group'] === self::ACF_GROUP_FLEXIBLE_CONTENT) {
            return self::getFlexibleContentSlideshow($args['acf_data']);
        }
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $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, $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.
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/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 ] = $this->priorities;
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/plugin.php
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    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[ $hook_name ]->do_action( $arg );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Calls the callback functions that have been added to an action hook, specifying arguments in an array.
 *
 * @since 2.1.0
 *
 * @see do_action() This function is identical, but the arguments passed to the
 *                  functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_actions        Stores the number of times each action was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the action to be executed.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
 */
function do_action_ref_array( $hook_name, $args ) {
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/themes/awsite/single-hole.php
<?php
// Required to prevent scope error when caching this page
global $post;
?>
 
<?php get_header(); ?>
 
 
<?php
/**
 * Slideshow
 *
 * @hooked output - 10
 *
 * @param $tag
 * @param $args => [] (additional arguments passed on to the functions hooked to the action)
 */
do_action('aw_slideshow', [
    'acf_group' => \AWsite\ContentBlocks\Blocks\SlideshowBlock::ACF_GROUP_BASIC,
    'render_type' => \AWsite\ContentBlocks\Blocks\SlideshowBlock::TYPE_HOLE_PAGE
]);
?>
 
 
<section id="scrollTarget" class="section">
    <div class="wrapper">
        <div class="block block--no-bottom padding-bottom--70 padding-top--90 padding-bottom--35-md padding-top--45-md">
            <?php
            /**
             * Hole Elements (heading)
             *
             * @hooked outputHoleStats - 10
             *
             * @param $tag
             * @param $args => [] (additional arguments passed on to the functions hooked to the action)
             */
            do_action('aw_hole_heading', []);
            ?>
        </div>
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/wp-includes/template-loader.php
            }
 
            break;
        }
    }
 
    if ( ! $template ) {
        $template = get_index_template();
    }
 
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    $template = apply_filters( 'template_include', $template );
    if ( $template ) {
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp/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';
 
}
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/index.php
    $cacheExclusionForeignRepository = new CacheExclusionForeignRepository($db);
 
    // Get excluded patterns from cache
    $excludedUriPatterns = $cacheExclusionForeignRepository->findAll();
 
    // Adds manual patterns
    $excludedUriPatterns = array_merge($excludedUriPatterns, CACHE_EXCLUSION_PATTERNS);
 
 
    // Instantiate Reverse Proxy
    $reverseProxy = new CachedReverseProxy(
        (new WordpressCacheAdapter(
            function() {
 
                // Our custom globals must be made available to the anonymous function to be recognized
                global $container;
                global $flexibleFormConfig;
 
                // Boots wordpress
                include_once(dirname( __FILE__ ) . '/wp/wp-blog-header.php');
            },
            $defaultMaxAge, $store
        ))->setExcludedUriPatterns($excludedUriPatterns)
    );
    $reverseProxy->setRepository($cachePurgeForeignRepository);
 
    // Run Cached Application
    $reverseProxy->run();
}
 
/** Loads the WordPress Environment and Template (Normal boot) */
else {
    require __DIR__ . '/wp/wp-blog-header.php';
}
 
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php
        return $this->surrogate;
    }
 
    /**
     * @return array
     */
    public function getHttpCacheOptions(Request $request)
    {
        return $this->httpCacheOptions;
    }
 
    /**
     * @param Request $request
     * @return mixed|void
     */
    public function bootstrap(Request $request)
    {
        ob_start();
 
        call_user_func($this->bootstrapFunction, array($request));
    }
 
    /**
     * @return string
     */
    public function getRawContent(Request $request)
    {
        $rawContent = ob_get_contents();
        ob_end_clean();
 
        return $rawContent;
    }
}
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/Adapters/GenericAdapter.php
        return $this->surrogate;
    }
 
    /**
     * @return array
     */
    public function getHttpCacheOptions(Request $request)
    {
        return $this->httpCacheOptions;
    }
 
    /**
     * @param Request $request
     * @return mixed|void
     */
    public function bootstrap(Request $request)
    {
        ob_start();
 
        call_user_func($this->bootstrapFunction, array($request));
    }
 
    /**
     * @return string
     */
    public function getRawContent(Request $request)
    {
        $rawContent = ob_get_contents();
        ob_end_clean();
 
        return $rawContent;
    }
}
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php
                $this->adapter->getStore($this->request),
                $this->adapter->getSurrogate($this->request),
                $this->adapter->getHttpCacheOptions($this->request)
            );
        }
 
        $response = $kernel->handle($this->request);
        $this->shutDownFunctionEnabled = false;
        $response->send();
        $kernel->terminate($this->request, $response);
    }
 
    /**
     * Bootstrap application
     */
    public function bootstrap()
    {
        if (!$this->bootstrapped) {
            $this->bootstrapped = true;
            $this->adapter->bootstrap($this->request);
        }
    }
 
    /**
     * @return string
     */
    public function getRawContent()
    {
        return $this->adapter->getRawContent($this->request);
    }
 
    /**
     * @return Response
     */
    public function buildResponse()
    {
        $this->bootstrap();
        $rawContent = $this->getRawContent();
        $response = new Response($rawContent);
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php
        if (!$this->bootstrapped) {
            $this->bootstrapped = true;
            $this->adapter->bootstrap($this->request);
        }
    }
 
    /**
     * @return string
     */
    public function getRawContent()
    {
        return $this->adapter->getRawContent($this->request);
    }
 
    /**
     * @return Response
     */
    public function buildResponse()
    {
        $this->bootstrap();
        $rawContent = $this->getRawContent();
        $response = new Response($rawContent);
 
        /**
         * Grab the headers and update response object
         */
        $currentHeaders = headers_list();
        foreach ($currentHeaders as $header) {
            $headers = $this->parseHTTPHeaders($header);
            foreach ($headers as $key => $value) {
                $response->headers->set($key, $value);
            }
        }
 
        $response->setStatusCode($this->getHTTPStatusCode($response));
        $response = $this->setCacheHeaders($this->request, $response);
 
        return $response;
    }
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php
        $this->dispatcher->dispatch(KernelEvents::REQUEST, $event);
 
        if ($event->hasResponse()) {
            return $this->filterResponse($event->getResponse(), $request, $type);
        }
 
        // load controller
        if (false === $controller = $this->resolver->getController($request)) {
            throw new NotFoundHttpException(sprintf('Unable to find the controller for path "%s". The route is wrongly configured.', $request->getPathInfo()));
        }
 
        $event = new FilterControllerEvent($this, $controller, $request, $type);
        $this->dispatcher->dispatch(KernelEvents::CONTROLLER, $event);
        $controller = $event->getController();
 
        // controller arguments
        $arguments = $this->resolver->getArguments($request, $controller);
 
        // call controller
        $response = \call_user_func_array($controller, $arguments);
 
        // view
        if (!$response instanceof Response) {
            $event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
            $this->dispatcher->dispatch(KernelEvents::VIEW, $event);
 
            if ($event->hasResponse()) {
                $response = $event->getResponse();
            }
 
            if (!$response instanceof Response) {
                $msg = sprintf('The controller must return a response (%s given).', $this->varToString($response));
 
                // the user may have forgotten to return something
                if (null === $response) {
                    $msg .= ' Did you forget to add a return statement somewhere in your controller?';
                }
                throw new \LogicException($msg);
            }
        }
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpKernel.php
    protected $dispatcher;
    protected $resolver;
    protected $requestStack;
 
    public function __construct(EventDispatcherInterface $dispatcher, ControllerResolverInterface $resolver, RequestStack $requestStack = null)
    {
        $this->dispatcher = $dispatcher;
        $this->resolver = $resolver;
        $this->requestStack = $requestStack ?: new RequestStack();
    }
 
    /**
     * {@inheritdoc}
     */
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        $request->headers->set('X-Php-Ob-Level', ob_get_level());
 
        try {
            return $this->handleRaw($request, $type);
        } catch (\Exception $e) {
            if ($e instanceof ConflictingHeadersException) {
                $e = new BadRequestHttpException('The request headers contain conflicting information regarding the origin of this request.', $e);
            }
            if (false === $catch) {
                $this->finishRequest($request, $type);
 
                throw $e;
            }
 
            return $this->handleException($e, $request, $type);
        }
    }
 
    /**
     * {@inheritdoc}
     */
    public function terminate(Request $request, Response $response)
    {
        $this->dispatcher->dispatch(KernelEvents::TERMINATE, new PostResponseEvent($this, $request, $response));
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php
            $request->server->set('HTTP_'.strtoupper(str_replace('-', '_', $name)), $v);
        }
        if (!$name && !$trustedHeaders[Request::HEADER_FORWARDED]) {
            $request->headers->set('X-Forwarded-For', $v = implode(', ', $trustedIps));
            $request->server->set('HTTP_X_FORWARDED_FOR', $v);
            Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X_FORWARDED_FOR');
        }
 
        // fix the client IP address by setting it to 127.0.0.1,
        // which is the core responsibility of this method
        $request->server->set('REMOTE_ADDR', '127.0.0.1');
 
        // ensure 127.0.0.1 is set as trusted proxy
        if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
            Request::setTrustedProxies(array_merge($trustedProxies, array('127.0.0.1')));
        }
 
        try {
            $e = null;
            $response = $kernel->handle($request, $type, $catch);
        } catch (\Throwable $e) {
        } catch (\Exception $e) {
        }
 
        // restore global state
        Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, $trustedHeaders[Request::HEADER_CLIENT_IP]);
        Request::setTrustedProxies($trustedProxies);
 
        if (null !== $e) {
            throw $e;
        }
 
        return $response;
    }
}
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php
        return $response;
    }
 
    /**
     * Forwards the Request to the backend and returns the Response.
     *
     * @param Request  $request A Request instance
     * @param bool     $catch   Whether to catch exceptions or not
     * @param Response $entry   A Response instance (the stale entry if present, null otherwise)
     *
     * @return Response A Response instance
     */
    protected function forward(Request $request, $catch = false, Response $entry = null)
    {
        if ($this->surrogate) {
            $this->surrogate->addSurrogateCapability($request);
        }
 
        // always a "master" request (as the real master request can be in cache)
        $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MASTER_REQUEST, $catch);
 
        // we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC
        if (null !== $entry && \in_array($response->getStatusCode(), array(500, 502, 503, 504))) {
            if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) {
                $age = $this->options['stale_if_error'];
            }
 
            if (abs($entry->getTtl()) < $age) {
                $this->record($request, 'stale-if-error');
 
                return $entry;
            }
        }
 
        $this->processResponseBody($request, $response);
 
        if ($this->isPrivateRequest($request) && !$response->headers->hasCacheControlDirective('public')) {
            $response->setPrivate();
        } elseif ($this->options['default_ttl'] > 0 && null === $response->getTtl() && !$response->headers->getCacheControlDirective('must-revalidate')) {
            $response->setTtl($this->options['default_ttl']);
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php
     *
     * @param Request $request A Request instance
     * @param bool    $catch   Whether to process exceptions
     *
     * @return Response A Response instance
     */
    protected function fetch(Request $request, $catch = false)
    {
        $subRequest = clone $request;
 
        // send no head requests because we want content
        if ('HEAD' === $request->getMethod()) {
            $subRequest->setMethod('GET');
        }
 
        // avoid that the backend sends no content
        $subRequest->headers->remove('if_modified_since');
        $subRequest->headers->remove('if_none_match');
 
        $response = $this->forward($subRequest, $catch);
 
        if ($response->isCacheable()) {
            $this->store($request, $response);
        }
 
        return $response;
    }
 
    /**
     * Forwards the Request to the backend and returns the Response.
     *
     * @param Request  $request A Request instance
     * @param bool     $catch   Whether to catch exceptions or not
     * @param Response $entry   A Response instance (the stale entry if present, null otherwise)
     *
     * @return Response A Response instance
     */
    protected function forward(Request $request, $catch = false, Response $entry = null)
    {
        if ($this->surrogate) {
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php
 
            return $this->fetch($request, $catch);
        }
 
        try {
            $entry = $this->store->lookup($request);
        } catch (\Exception $e) {
            $this->record($request, 'lookup-failed');
 
            if ($this->options['debug']) {
                throw $e;
            }
 
            return $this->pass($request, $catch);
        }
 
        if (null === $entry) {
            $this->record($request, 'miss');
 
            return $this->fetch($request, $catch);
        }
 
        if (!$this->isFreshEnough($request, $entry)) {
            $this->record($request, 'stale');
 
            return $this->validate($request, $entry, $catch);
        }
 
        $this->record($request, 'fresh');
 
        $entry->headers->set('Age', $entry->getAge());
 
        return $entry;
    }
 
    /**
     * Validates that a cache entry is fresh.
     *
     * The original request is used as a template for a conditional
     * GET request with the backend.
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/symfony/http-kernel/HttpCache/HttpCache.php
            // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1
            // and adding the X-Forwarded-For header, see HttpCache::forward()).
            $this->request = clone $request;
            if (null !== $this->surrogate) {
                $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy();
            }
        }
 
        $path = $request->getPathInfo();
        if ($qs = $request->getQueryString()) {
            $path .= '?'.$qs;
        }
        $this->traces[$request->getMethod().' '.$path] = array();
 
        if (!$request->isMethodSafe(false)) {
            $response = $this->invalidate($request, $catch);
        } elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) {
            $response = $this->pass($request, $catch);
        } else {
            $response = $this->lookup($request, $catch);
        }
 
        $this->restoreResponseBody($request, $response);
 
        $response->setDate(\DateTime::createFromFormat('U', time(), new \DateTimeZone('UTC')));
 
        if (HttpKernelInterface::MASTER_REQUEST === $type && $this->options['debug']) {
            $response->headers->set('X-Symfony-Cache', $this->getLog());
        }
 
        if (null !== $this->surrogate) {
            if (HttpKernelInterface::MASTER_REQUEST === $type) {
                $this->surrogateCacheStrategy->update($response);
            } else {
                $this->surrogateCacheStrategy->add($response);
            }
        }
 
        $response->prepare($request);
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/wp-content/mu-plugins/AWsite/lib/Artworking/Cache/CachedReverseProxy.php
    protected function buildAndCacheResponse()
    {
        $controllerResolver = new ControllerResolver(array($this, 'buildResponse'));
        $kernel = new HttpKernel(new EventDispatcher(), $controllerResolver);
 
        if ($this->adapter->isCachingEnabled($this->request)) {
            $kernel = new HttpCache(
                $kernel,
                $this->adapter->getStore($this->request),
                $this->adapter->getSurrogate($this->request),
                $this->adapter->getHttpCacheOptions($this->request)
            );
 
            // If request url has been modified, we must purge it from the cache to deliver a fresh copy
            if ( $this->isRequestUriModified( $this->request->getUri() ) ) {
                $this->purgeUrl( $this->request->getUri() );
            }
        }
 
        $response = $kernel->handle($this->request);
        $this->shutDownFunctionEnabled = false;
        $response->send();
        $kernel->terminate($this->request, $response);
    }
 
    private function isRequestUriModified(string $url): bool
    {
        return $this->cachePurgeRepository->isUrlDirty($url);
    }
 
    private function purgeUrl(string $url): void
    {
        // Purge cache for url
        $this->adapter->getStore($this->request)->purge(  $url );
 
        // Removes url from purge list
        $this->cachePurgeRepository->clearUrl($url);
    }
}
/var/www/vhosts/worksopgolfclub.com/httpdocs/vendor/mindgruve/mg-reverse-proxy/src/CachedReverseProxy.php
     */
    protected $request;
 
    /**
     * @var bool
     */
    protected $bootstrapped = false;
 
    public function __construct(CacheAdapterInterface $adapter)
    {
        $this->request = Request::createFromGlobals();
        $this->adapter = $adapter;
    }
 
    /**
     *
     */
    public function run()
    {
        $this->buildAndCacheResponse();
    }
 
    /**
     *
     */
    protected function buildAndCacheResponse()
    {
 
        $controllerResolver = new ControllerResolver(array($this, 'buildResponse'));
        $kernel = new HttpKernel(new EventDispatcher(), $controllerResolver);
 
        if ($this->adapter->isCachingEnabled($this->request)) {
            $kernel = new HttpCache(
                $kernel,
                $this->adapter->getStore($this->request),
                $this->adapter->getSurrogate($this->request),
                $this->adapter->getHttpCacheOptions($this->request)
            );
        }
 
/var/www/vhosts/worksopgolfclub.com/httpdocs/site/index.php
 
    // Instantiate Reverse Proxy
    $reverseProxy = new CachedReverseProxy(
        (new WordpressCacheAdapter(
            function() {
 
                // Our custom globals must be made available to the anonymous function to be recognized
                global $container;
                global $flexibleFormConfig;
 
                // Boots wordpress
                include_once(dirname( __FILE__ ) . '/wp/wp-blog-header.php');
            },
            $defaultMaxAge, $store
        ))->setExcludedUriPatterns($excludedUriPatterns)
    );
    $reverseProxy->setRepository($cachePurgeForeignRepository);
 
    // Run Cached Application
    $reverseProxy->run();
}
 
/** Loads the WordPress Environment and Template (Normal boot) */
else {
    require __DIR__ . '/wp/wp-blog-header.php';
}
 
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /the-course/course-tour/hole-17/
USER worksopftp
HOME /var/www/vhosts/worksopgolfclub.com
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /the-course/course-tour/hole-17/
REMOTE_PORT 57050
SCRIPT_FILENAME /var/www/vhosts/worksopgolfclub.com/httpdocs/site/index.php
SERVER_ADMIN root@localhost
CONTEXT_DOCUMENT_ROOT /var/www/vhosts/worksopgolfclub.com/httpdocs/site
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /var/www/vhosts/worksopgolfclub.com/httpdocs/site
REMOTE_ADDR 44.192.48.196
SERVER_PORT 443
SERVER_ADDR 87.239.16.57
SERVER_NAME worksopgolfclub.com
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_CF_CONNECTING_IP 44.192.48.196
HTTP_IF_MODIFIED_SINCE Thu, 22 Feb 2024 07:01:36 GMT
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/)
HTTP_CF_VISITOR {\"scheme\":\"https\"}
HTTP_X_FORWARDED_PROTO https
HTTP_CF_RAY 894edc823ba02094-IAD
HTTP_ACCEPT_ENCODING gzip, br
HTTP_CF_IPCOUNTRY US
HTTP_CDN_LOOP cloudflare
HTTP_CONNECTION close
HTTP_X_ACCEL_INTERNAL /internal-nginx-static-location
HTTP_X_FORWARDED_FOR 44.192.48.196
HTTP_X_REAL_IP 44.192.48.196
HTTP_HOST worksopgolfclub.com
proxy-nokeepalive 1
HTTPS on
PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
HTTP_AUTHORIZATION
UNIQUE_ID Zm@AyM@OYhEmnZd0ZoC0PwAAAAI
REDIRECT_STATUS 200
REDIRECT_HTTPS on
REDIRECT_PERL5LIB /usr/share/awstats/lib:/usr/share/awstats/plugins
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_UNIQUE_ID Zm@AyM@OYhEmnZd0ZoC0PwAAAAI
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1718583496.3398
REQUEST_TIME 1718583496
empty
0. Whoops\Handler\PrettyPageHandler