ErrorException {#2024 #severity: E_WARNING }
public function getHero() { $heroFields = get_field('page_about_hero'); return (object)[ 'image' => $heroFields['image'], 'title' => $heroFields['title'], 'subtitle' => $heroFields['subtitle'], 'quote' => $heroFields['quote'], ]; } * @throws \ErrorException */ public function handleError($level, $message, $file = '', $line = 0, $context = []) { try { parent::handleError($level, $message, $file, $line, $context); } catch (Throwable $e) { if (! apply_filters('acorn/throw_error_exception', true, $e)) { return false; } public function getHero() { $heroFields = get_field('page_about_hero'); return (object)[ 'image' => $heroFields['image'], 'title' => $heroFields['title'], 'subtitle' => $heroFields['subtitle'], 'quote' => $heroFields['quote'], ]; } * @return array */ public function override() { return [ 'hero' => $this->getHero(), 'possibilities' => $this->getPossibilities(), 'whyUs' => $this->getWhyUs(), ]; } * * @return array */ protected function merge() { [$with, $override] = [$this->with(), $this->override()]; if (! $with && ! $override) { return array_merge( $this->extractPublicProperties(), $this->extractPublicMethods(), public function compose(View $view) { $this->view = $view; $this->data = new Fluent($view->getData()); $view->with($this->merge()); } /** * The merged data to be passed to view before rendering. * // Once we have the class and method name, we can build the Closure to resolve // the instance out of the IoC container and call the method on it with the // given arguments that are passed to the Closure as the composer's data. return function () use ($class, $method) { return $this->container->make($class)->{$method}(...func_get_args()); }; } /** * Parse a class based composer name. return function ($event, $payload) use ($listener, $wildcard) { if ($wildcard) { return $listener($event, $payload); } return $listener(...array_values($payload)); }; } /** * Create a class based listener using the IoC container. } $responses = []; foreach ($this->getListeners($event) as $listener) { $response = $listener($event, $payload); // If a response is returned from the listener and event halting is enabled // we will just return this response, and not call the rest of the event // listeners. Otherwise we will add the response on the response list. if ($halt && ! is_null($response)) { ); return null; } return $this->invokeListeners($event, $payload, $halt); } /** * Broadcast an event and call its listeners. * * @param \Illuminate\Contracts\View\View $view * @return void */ public function callComposer(ViewContract $view) { $this->events->dispatch('composing: '.$view->name(), [$view]); } /** * Call the creator for a given view. * // We will keep track of the number of views being rendered so we can flush // the section after the complete rendering operation is done. This will // clear out the sections for any separate views that may be rendered. $this->factory->incrementRender(); $this->factory->callComposer($this); $contents = $this->getContents(); // Once we've finished rendering the view, we'll decrement the render count // so that each section gets flushed out next time a view is created and * @throws \Throwable */ public function render(callable $callback = null) { try { $contents = $this->renderContents(); $response = isset($callback) ? $callback($this, $contents) : null; // Once we have the contents of the view, we will flush the sections if we are // done rendering all views so that there is nothing left hanging over when<body <?php body_class('body'); ?>><?php wp_body_open(); ?><?php do_action('get_header'); ?><div id="app"><?php echo view(app('sage.view'), app('sage.data'))->render(); ?></div><?php do_action('get_footer'); ?><?php wp_footer(); ?></body> * * @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() ); } // Set up the WordPress query. wp(); // Load the theme template. require_once ABSPATH . WPINC . '/template-loader.php';}<?php/** * WordPress View Bootstrapper */define('WP_USE_THEMES', true);require __DIR__ . '/wp/wp-blog-header.php';|
ErrorException
|
|---|
ErrorException:
Undefined array key "image"
at /app/www/releases/4/web/app/themes/sage/app/View/Composers/PageAbout.php:38
at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Undefined array key "image"', '/app/www/releases/4/web/app/themes/sage/app/View/Composers/PageAbout.php', 38, array())
(/app/www/releases/4/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49)
at Roots\Acorn\Bootstrap\HandleExceptions->handleError(2, 'Undefined array key "image"', '/app/www/releases/4/web/app/themes/sage/app/View/Composers/PageAbout.php', 38)
(/app/www/releases/4/web/app/themes/sage/app/View/Composers/PageAbout.php:38)
at App\View\Composers\PageAbout->getHero()
(/app/www/releases/4/web/app/themes/sage/app/View/Composers/PageAbout.php:26)
at App\View\Composers\PageAbout->override()
(/app/www/releases/4/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php:93)
at Roots\Acorn\View\Composer->merge()
(/app/www/releases/4/vendor/roots/acorn/src/Roots/Acorn/View/Composer.php:83)
at Roots\Acorn\View\Composer->compose(object(View))
(/app/www/releases/4/vendor/illuminate/view/Concerns/ManagesEvents.php:124)
at Illuminate\View\Factory->Illuminate\View\Concerns\{closure}(object(View))
(/app/www/releases/4/vendor/illuminate/events/Dispatcher.php:458)
at Illuminate\Events\Dispatcher->Illuminate\Events\{closure}('composing: page-about', array(object(View)))
(/app/www/releases/4/vendor/illuminate/events/Dispatcher.php:286)
at Illuminate\Events\Dispatcher->invokeListeners('composing: page-about', array(object(View)), false)
(/app/www/releases/4/vendor/illuminate/events/Dispatcher.php:266)
at Illuminate\Events\Dispatcher->dispatch('composing: page-about', array(object(View)))
(/app/www/releases/4/vendor/illuminate/view/Concerns/ManagesEvents.php:177)
at Illuminate\View\Factory->callComposer(object(View))
(/app/www/releases/4/vendor/illuminate/view/View.php:188)
at Illuminate\View\View->renderContents()
(/app/www/releases/4/vendor/illuminate/view/View.php:159)
at Illuminate\View\View->render()
(/app/www/releases/4/web/app/themes/sage/index.php:16)
at include('/app/www/releases/4/web/app/themes/sage/index.php')
(/app/www/releases/4/web/wp/wp-includes/template-loader.php:106)
at require_once('/app/www/releases/4/web/wp/wp-includes/template-loader.php')
(/app/www/releases/4/web/wp/wp-blog-header.php:19)
at require('/app/www/releases/4/web/wp/wp-blog-header.php')
(/app/www/releases/4/web/index.php:6)
|