Symfony Exception

ErrorException ViewException ViewException ViewException

HTTP 500 Internal Server Error

Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

Exceptions 4

Illuminate\View\ ViewException

  1. //https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
  2. add_action'nav_menu_css_class''ifour_add_cpt_ancestor_class'10);
  3. function ifour_add_cpt_ancestor_class$classes$item$args ) {
  4.     global $post;
  5.     $current_post_type get_post_type_objectget_post_type$post->ID ) );
  6.     $current_post_type_slug $current_post_type->rewrite'slug' ] ?? false;
  7.     $menu_slug strtolowertrim$item->url ) );
  8.     if( !empty($current_post_type_slug) && strpos$menu_slug$current_post_type_slug ) !== false )
  9.         $classes[] = 'current_page_parent';
  10.     return $classes;
  1.         // flush out any stray output that might get out before an error occurs or
  2.         // an exception is thrown. This prevents any partial views from leaking.
  3.         try {
  4.             $this->files->getRequire($path$data);
  5.         } catch (Throwable $e) {
  6.             $this->handleViewException($e$obLevel);
  7.         }
  8.         return ltrim(ob_get_clean());
  9.     }
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <body <?php body_class(); ?> x-data="body">
  2.   <?php wp_body_open(); ?>
  3.   <?php do_action('get_header'); ?>
  4.   <div id="app">
  5.     <?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
  6.   </div>
  7.   <?php do_action('get_footer'); ?>
  8.   <?php wp_footer(); ?>
  9. </body>
include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Illuminate\View\ ViewException

Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

  1. //https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
  2. add_action'nav_menu_css_class''ifour_add_cpt_ancestor_class'10);
  3. function ifour_add_cpt_ancestor_class$classes$item$args ) {
  4.     global $post;
  5.     $current_post_type get_post_type_objectget_post_type$post->ID ) );
  6.     $current_post_type_slug $current_post_type->rewrite'slug' ] ?? false;
  7.     $menu_slug strtolowertrim$item->url ) );
  8.     if( !empty($current_post_type_slug) && strpos$menu_slug$current_post_type_slug ) !== false )
  9.         $classes[] = 'current_page_parent';
  10.     return $classes;
  1.         // flush out any stray output that might get out before an error occurs or
  2.         // an exception is thrown. This prevents any partial views from leaking.
  3.         try {
  4.             $this->files->getRequire($path$data);
  5.         } catch (Throwable $e) {
  6.             $this->handleViewException($e$obLevel);
  7.         }
  8.         return ltrim(ob_get_clean());
  9.     }
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1.     <p class="mt-12">Sorry, the page you are looking for could not be found</p>
  2.     <p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
  3.   </div>
  4. <?php $__env->stopSection(); ?>
  5. <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data''__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <body <?php body_class(); ?> x-data="body">
  2.   <?php wp_body_open(); ?>
  3.   <?php do_action('get_header'); ?>
  4.   <div id="app">
  5.     <?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
  6.   </div>
  7.   <?php do_action('get_footer'); ?>
  8.   <?php wp_footer(); ?>
  9. </body>
include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Illuminate\View\ ViewException

Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

  1. //https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
  2. add_action'nav_menu_css_class''ifour_add_cpt_ancestor_class'10);
  3. function ifour_add_cpt_ancestor_class$classes$item$args ) {
  4.     global $post;
  5.     $current_post_type get_post_type_objectget_post_type$post->ID ) );
  6.     $current_post_type_slug $current_post_type->rewrite'slug' ] ?? false;
  7.     $menu_slug strtolowertrim$item->url ) );
  8.     if( !empty($current_post_type_slug) && strpos$menu_slug$current_post_type_slug ) !== false )
  9.         $classes[] = 'current_page_parent';
  10.     return $classes;
  1.         // flush out any stray output that might get out before an error occurs or
  2.         // an exception is thrown. This prevents any partial views from leaking.
  3.         try {
  4.             $this->files->getRequire($path$data);
  5.         } catch (Throwable $e) {
  6.             $this->handleViewException($e$obLevel);
  7.         }
  8.         return ltrim(ob_get_clean());
  9.     }
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <a class="sr-only focus:not-sr-only" href="#main">
  2.   <?php echo e(__('Skip to content')); ?>
  3. </a>
  4. <?php echo $__env->make('sections.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data''__path']))->render(); ?>
  5.   <main id="main" class="main">
  6.     <?php echo $__env->yieldContent('content'); ?>
  7.   </main>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1.     <p class="mt-12">Sorry, the page you are looking for could not be found</p>
  2.     <p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
  3.   </div>
  4. <?php $__env->stopSection(); ?>
  5. <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data''__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <body <?php body_class(); ?> x-data="body">
  2.   <?php wp_body_open(); ?>
  3.   <?php do_action('get_header'); ?>
  4.   <div id="app">
  5.     <?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
  6.   </div>
  7.   <?php do_action('get_footer'); ?>
  8.   <?php wp_footer(); ?>
  9. </body>
include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

ErrorException

Trying to get property 'ID' of non-object

  1. //https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
  2. add_action'nav_menu_css_class''ifour_add_cpt_ancestor_class'10);
  3. function ifour_add_cpt_ancestor_class$classes$item$args ) {
  4.     global $post;
  5.     $current_post_type get_post_type_objectget_post_type$post->ID ) );
  6.     $current_post_type_slug $current_post_type->rewrite'slug' ] ?? false;
  7.     $menu_slug strtolowertrim$item->url ) );
  8.     if( !empty($current_post_type_slug) && strpos$menu_slug$current_post_type_slug ) !== false )
  9.         $classes[] = 'current_page_parent';
  10.     return $classes;
  1.      * @throws \ErrorException
  2.      */
  3.     public function handleError($level$message$file ''$line 0$context = [])
  4.     {
  5.         try {
  6.             parent::handleError($level$message$file$line$context);
  7.         } catch (Throwable $e) {
  8.             if (! apply_filters('acorn/throw_error_exception'true$e)) {
  9.                 return false;
  10.             }
  1. //https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
  2. add_action'nav_menu_css_class''ifour_add_cpt_ancestor_class'10);
  3. function ifour_add_cpt_ancestor_class$classes$item$args ) {
  4.     global $post;
  5.     $current_post_type get_post_type_objectget_post_type$post->ID ) );
  6.     $current_post_type_slug $current_post_type->rewrite'slug' ] ?? false;
  7.     $menu_slug strtolowertrim$item->url ) );
  8.     if( !empty($current_post_type_slug) && strpos$menu_slug$current_post_type_slug ) !== false )
  9.         $classes[] = 'current_page_parent';
  10.     return $classes;
  1.                 if ( === $the_['accepted_args'] ) {
  2.                     $value call_user_func$the_['function'] );
  3.                 } elseif ( $the_['accepted_args'] >= $num_args ) {
  4.                     $value call_user_func_array$the_['function'], $args );
  5.                 } else {
  6.                     $value call_user_func_array$the_['function'], array_slice$args0$the_['accepted_args'] ) );
  7.                 }
  8.             }
  9.         } while ( false !== next$this->iterations$nesting_level ] ) );
  10.         unset( $this->iterations$nesting_level ] );
  1.     }
  2.     // Pass the value to WP_Hook.
  3.     array_unshift$args$value );
  4.     $filtered $wp_filter$hook_name ]->apply_filters$value$args );
  5.     array_pop$wp_current_filter );
  6.     return $filtered;
  7. }
  1.          * @param string[] $classes   Array of the CSS classes that are applied to the menu item's `<li>` element.
  2.          * @param WP_Post  $menu_item The current menu item object.
  3.          * @param stdClass $args      An object of wp_nav_menu() arguments.
  4.          * @param int      $depth     Depth of menu item. Used for padding.
  5.          */
  6.         $class_names implode' 'apply_filters'nav_menu_css_class'array_filter$classes ), $menu_item$args$depth ) );
  7.         /**
  8.          * Filters the ID attribute applied to a menu item's list item element.
  9.          *
  10.          * @since 3.0.1
  1.         $this->has_children = ! empty( $children_elements$id ] );
  2.         if ( isset( $args[0] ) && is_array$args[0] ) ) {
  3.             $args[0]['has_children'] = $this->has_children// Back-compat.
  4.         }
  5.         $this->start_el$output$element$depth, ...array_values$args ) );
  6.         // Descend only when the depth is right and there are children for this element.
  7.         if ( ( == $max_depth || $max_depth $depth ) && isset( $children_elements$id ] ) ) {
  8.             foreach ( $children_elements$id ] as $child ) {
  1.                 }
  2.             }
  3.         }
  4.         foreach ( $top_level_elements as $e ) {
  5.             $this->display_element$e$children_elements$max_depth0$args$output );
  6.         }
  7.         /*
  8.          * If we are displaying all levels, and remaining children_elements is not empty,
  9.          * then we got orphans, which should be displayed regardless.
  1.  * @return string The HTML list content for the menu items.
  2.  */
  3. function walk_nav_menu_tree$items$depth$args ) {
  4.     $walker = ( empty( $args->walker ) ) ? new Walker_Nav_Menu() : $args->walker;
  5.     return $walker->walk$items$depth$args );
  6. }
  7. /**
  8.  * Prevents a menu item ID from being used more than once.
  9.  *
  1.      * @param array    $sorted_menu_items The menu items, sorted by each menu item's menu order.
  2.      * @param stdClass $args              An object containing wp_nav_menu() arguments.
  3.      */
  4.     $sorted_menu_items apply_filters'wp_nav_menu_objects'$sorted_menu_items$args );
  5.     $items .= walk_nav_menu_tree$sorted_menu_items$args->depth$args );
  6.     unset( $sorted_menu_items );
  7.     // Attributes.
  8.     if ( ! empty( $args->menu_id ) ) {
  9.         $wrap_id $args->menu_id;
  1. <?php endif; ?>
  2.                 </a>
  3.                 <div class="burger-close" @click="mobileNav = !mobileNav"></div>
  4.             </div>
  5.             <?php echo wp_nav_menu([
  6.                 'menu' => 'main-menu',
  7.                 'menu_id' => 'mobile-menu',
  8.                 'echo' => false,
  9.                 'container' => false
  10.             ]); ?>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <a class="sr-only focus:not-sr-only" href="#main">
  2.   <?php echo e(__('Skip to content')); ?>
  3. </a>
  4. <?php echo $__env->make('sections.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data''__path']))->render(); ?>
  5.   <main id="main" class="main">
  6.     <?php echo $__env->yieldContent('content'); ?>
  7.   </main>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1.     <p class="mt-12">Sorry, the page you are looking for could not be found</p>
  2.     <p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
  3.   </div>
  4. <?php $__env->stopSection(); ?>
  5. <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data''__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
  1.             $__data $data;
  2.             return (static function () use ($__path$__data) {
  3.                 extract($__dataEXTR_SKIP);
  4.                 return require $__path;
  5.             })();
  6.         }
  7.         throw new FileNotFoundException("File does not exist at path {$path}.");
  8.     }
  1.             return (static function () use ($__path$__data) {
  2.                 extract($__dataEXTR_SKIP);
  3.                 return require $__path;
  4.             })();
  5.         }
  6.         throw new FileNotFoundException("File does not exist at path {$path}.");
  7.     }
  1.         // We'll evaluate the contents of the view inside a try/catch block so we can
  2.         // flush out any stray output that might get out before an error occurs or
  3.         // an exception is thrown. This prevents any partial views from leaking.
  4.         try {
  5.             $this->files->getRequire($path$data);
  6.         } catch (Throwable $e) {
  7.             $this->handleViewException($e$obLevel);
  8.         }
  9.         return ltrim(ob_get_clean());
  1.         }
  2.         // Once we have the path to the compiled file, we will evaluate the paths with
  3.         // typical PHP just like any other templates. We also keep a stack of views
  4.         // which have been rendered for right exception messages to be generated.
  5.         $results $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
  6.         array_pop($this->lastCompiled);
  7.         return $results;
  8.     }
  1.      *
  2.      * @return string
  3.      */
  4.     protected function getContents()
  5.     {
  6.         return $this->engine->get($this->path$this->gatherData());
  7.     }
  8.     /**
  9.      * Get the data bound to the view instance.
  10.      *
  1.         // clear out the sections for any separate views that may be rendered.
  2.         $this->factory->incrementRender();
  3.         $this->factory->callComposer($this);
  4.         $contents $this->getContents();
  5.         // Once we've finished rendering the view, we'll decrement the render count
  6.         // so that each sections get flushed out next time a view is created and
  7.         // no old sections are staying around in the memory of an environment.
  8.         $this->factory->decrementRender();
  1.      * @throws \Throwable
  2.      */
  3.     public function render(callable $callback null)
  4.     {
  5.         try {
  6.             $contents $this->renderContents();
  7.             $response = isset($callback) ? $callback($this$contents) : null;
  8.             // Once we have the contents of the view, we will flush the sections if we are
  9.             // done rendering all views so that there is nothing left hanging over when
  1. <body <?php body_class(); ?> x-data="body">
  2.   <?php wp_body_open(); ?>
  3.   <?php do_action('get_header'); ?>
  4.   <div id="app">
  5.     <?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
  6.   </div>
  7.   <?php do_action('get_footer'); ?>
  8.   <?php wp_footer(); ?>
  9. </body>
include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php (line 106)
  1.      *
  2.      * @param string $template The path of the template to include.
  3.      */
  4.     $template apply_filters'template_include'$template );
  5.     if ( $template ) {
  6.         include $template;
  7.     } elseif ( current_user_can'switch_themes' ) ) {
  8.         $theme wp_get_theme();
  9.         if ( $theme->errors() ) {
  10.             wp_die$theme->errors() );
  11.         }
require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php (line 19)
  1.     // Set up the WordPress query.
  2.     wp();
  3.     // Load the theme template.
  4.     require_once ABSPATH WPINC '/template-loader.php';
  5. }
require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') in /var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php (line 17)
  1.  * @var bool
  2.  */
  3. define'WP_USE_THEMES'true );
  4. /** Loads the WordPress Environment and Template */
  5. require __DIR__ '/wp-blog-header.php';

Stack Traces 4

[4/4] ViewException
Illuminate\View\ViewException:
Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

  at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100
  at Illuminate\View\Engines\CompilerEngine->handleViewException()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38)
  at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106)
  at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17)                
[3/4] ViewException
Illuminate\View\ViewException:
Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

  at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100
  at Illuminate\View\Engines\CompilerEngine->handleViewException()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38)
  at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106)
  at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17)                
[2/4] ViewException
Illuminate\View\ViewException:
Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php)

  at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100
  at Illuminate\View\Engines\CompilerEngine->handleViewException()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php:6)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38)
  at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106)
  at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17)                
[1/4] ErrorException
ErrorException:
Trying to get property 'ID' of non-object

  at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:54)
  at Roots\Acorn\Bootstrap\HandleExceptions->handleError()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100)
  at ifour_add_cpt_ancestor_class()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-hook.php:326)
  at WP_Hook->apply_filters()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/plugin.php:205)
  at apply_filters()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-walker-nav-menu.php:176)
  at Walker_Nav_Menu->start_el()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-walker.php:147)
  at Walker->display_element()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-walker.php:247)
  at Walker->walk()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/nav-menu-template.php:616)
  at walk_nav_menu_tree()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/nav-menu-template.php:236)
  at wp_nav_menu()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/64a256582289f5d17c9bd64360c7bfa52b9da892.php:22)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/64a256582289f5d17c9bd64360c7bfa52b9da892.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php:6)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107)
  at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108)
  at Illuminate\Filesystem\Filesystem->getRequire()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58)
  at Illuminate\View\Engines\PhpEngine->evaluatePath()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61)
  at Illuminate\View\Engines\CompilerEngine->get()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139)
  at Illuminate\View\View->getContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122)
  at Illuminate\View\View->renderContents()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91)
  at Illuminate\View\View->render()
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38)
  at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106)
  at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19)
  at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php')
     (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17)