/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/app/View/Composers/Event.php
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_query' => [
[
'key' => 's_date',
'value' => date('Y-m-d'),
'compare' => '>=',
'meta_type' => 'DATE'
]
]
]);
foreach($posts as $key => $post) {
$output[] = (object)[
'image' => wp_get_attachment_image_url(get_post_thumbnail_id($post), 'large'),
'cat' => get_the_terms($post, 'event_category')[0]->name,
'cat_link' => get_term_link(get_the_terms($post, 'event_category')[0]->term_id, 'event_category'),
'icon' => \carbon_get_term_meta(get_the_terms($post, 'event_category')[0]->term_id, 'icon'),
'title' => get_the_title($post),
'excerpt' => get_the_excerpt($post),
'link' => get_post_permalink($post),
'start_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 's_date'))),
'end_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 'e_date'))),
'dont' => \carbon_get_post_meta($post->ID, 'dont'),
'ex_link' => \carbon_get_post_meta($post->ID, 'ex_link'),
'reg_url' => \carbon_get_post_meta($post->ID, 'reg_url')
];
}
return $output;
},
'offsetUpcomingEvents' => function($num_posts, $offset) {
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
Arguments
"Trying to access array offset on value of type bool (View: /var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/resources/views/template-events.blade.php)"
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/Engines/PhpEngine.php
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
/**
* Handle a view exception.
*
* @param \Throwable $e
* @param int $obLevel
* @return void
*
* @throws \Throwable
*/
protected function handleViewException(Throwable $e, $obLevel)
{
while (ob_get_level() > $obLevel) {
ob_end_clean();
}
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/app/View/Composers/Event.php
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_query' => [
[
'key' => 's_date',
'value' => date('Y-m-d'),
'compare' => '>=',
'meta_type' => 'DATE'
]
]
]);
foreach($posts as $key => $post) {
$output[] = (object)[
'image' => wp_get_attachment_image_url(get_post_thumbnail_id($post), 'large'),
'cat' => get_the_terms($post, 'event_category')[0]->name,
'cat_link' => get_term_link(get_the_terms($post, 'event_category')[0]->term_id, 'event_category'),
'icon' => \carbon_get_term_meta(get_the_terms($post, 'event_category')[0]->term_id, 'icon'),
'title' => get_the_title($post),
'excerpt' => get_the_excerpt($post),
'link' => get_post_permalink($post),
'start_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 's_date'))),
'end_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 'e_date'))),
'dont' => \carbon_get_post_meta($post->ID, 'dont'),
'ex_link' => \carbon_get_post_meta($post->ID, 'ex_link'),
'reg_url' => \carbon_get_post_meta($post->ID, 'reg_url')
];
}
return $output;
},
'offsetUpcomingEvents' => function($num_posts, $offset) {
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
Arguments
"Trying to access array offset on value of type bool"
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/app/View/Composers/Event.php
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
'orderby' => 'meta_value',
'meta_query' => [
[
'key' => 's_date',
'value' => date('Y-m-d'),
'compare' => '>=',
'meta_type' => 'DATE'
]
]
]);
foreach($posts as $key => $post) {
$output[] = (object)[
'image' => wp_get_attachment_image_url(get_post_thumbnail_id($post), 'large'),
'cat' => get_the_terms($post, 'event_category')[0]->name,
'cat_link' => get_term_link(get_the_terms($post, 'event_category')[0]->term_id, 'event_category'),
'icon' => \carbon_get_term_meta(get_the_terms($post, 'event_category')[0]->term_id, 'icon'),
'title' => get_the_title($post),
'excerpt' => get_the_excerpt($post),
'link' => get_post_permalink($post),
'start_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 's_date'))),
'end_date' => date('M d, Y', strtotime(\carbon_get_post_meta($post->ID, 'e_date'))),
'dont' => \carbon_get_post_meta($post->ID, 'dont'),
'ex_link' => \carbon_get_post_meta($post->ID, 'ex_link'),
'reg_url' => \carbon_get_post_meta($post->ID, 'reg_url')
];
}
return $output;
},
'offsetUpcomingEvents' => function($num_posts, $offset) {
$output = [];
$posts = get_posts([
'post_type' => 'event',
'numberposts' => $num_posts,
'order' => 'ASC',
/var/www/vhosts/melanoma.org/httpdocs/wp-content/cache/acorn/framework/views/76416b00a027f255f500694150d63270.php
<form role="search" method="get" id="event-searchform" action="<?php echo e(esc_url( home_url( '/' ))); ?>">
<div>
<label class="screen-reader-text" for="s">Search</label>
<input type="text" value"" name="s" placeholder="Search" />
<input type="hidden" value="1" name="sentence" />
<input type="hidden" value="event" name="post_type" />
<button type="submit" value="Search" ><i class="fa-sharp fa-regular fa-magnifying-glass c(dark-blue)"></i></button>
</div>
</form>
</div>
</div>
</div>
<div class="block(upEvents)">
<div class="container">
<div class="top">
<h2 class="fz(40) c(dark-blue)">Upcoming Events</h2>
<a href="/news-press/event" class="dark-blue-solid">View All</a>
</div>
<div class="list">
<?php $__currentLoopData = $upcomingEvents(6); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="item">
<div class="image">
<?php if(!empty($item->image )): ?>
<img src="<?php echo e($item->image); ?>" alt="<?php echo e(get_post_meta($item->image, '_wp_attachment_image_alt', true)); ?>">
<?php else: ?>
<img src="<?php echo e(wp_get_attachment_image_url(\carbon_get_theme_option('default'), 'full')); ?>" alt="<?php echo e(get_post_meta(wp_get_attachment_image_url(\carbon_get_theme_option('default'), 'full'), '_wp_attachment_image_alt', true)); ?>">
<?php endif; ?>
</div>
<a href="<?php echo e($item->cat_link); ?>" class="cat-tag"><i class="<?php echo e($item->icon); ?> c(dark-blue)"></i><p class="fz(16) c(dark-blue)"><?php echo $item->cat; ?></p></a>
<h3 class="fz(30) c(dark-blue)"><?php echo $item->title; ?></h3>
<?php if($item->dont !== true): ?>
<p class="fz(16) c(dark-blue) <?php echo e($pastDate($item->start_date)); ?> dates"><?php echo e($item->start_date); ?> - <?php echo e($item->end_date); ?></p>
<?php else: ?>
<p class="fz(16) c(dark-blue) <?php echo e($pastDate($item->start_date)); ?> dates"><?php echo e($item->start_date); ?></p>
<?php endif; ?>
<div class="btns">
<?php if(!empty($item->ex_link)): ?>
<a href="<?php echo e($item->ex_link); ?>" class="dark-blue-border">Learn More</a>
<?php else: ?>
<a href="<?php echo e($item->link); ?>" class="dark-blue-border">Learn More</a>
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
Arguments
"/var/www/vhosts/melanoma.org/httpdocs/wp-content/cache/acorn/framework/views/76416b00a027f255f500694150d63270.php"
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/filesystem/Filesystem.php
/**
* Get the returned value of a file.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function getRequire($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
/**
* Require the given file once.
*
* @param string $path
* @param array $data
* @return mixed
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
public function requireOnce($path, array $data = [])
{
if ($this->isFile($path)) {
$__path = $path;
$__data = $data;
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/Engines/PhpEngine.php
}
/**
* Get the evaluated contents of the view at the given path.
*
* @param string $path
* @param array $data
* @return string
*/
protected function evaluatePath($path, $data)
{
$obLevel = ob_get_level();
ob_start();
// We'll evaluate the contents of the view inside a try/catch block so we can
// flush out any stray output that might get out before an error occurs or
// an exception is thrown. This prevents any partial views from leaking.
try {
$this->files->getRequire($path, $data);
} catch (Throwable $e) {
$this->handleViewException($e, $obLevel);
}
return ltrim(ob_get_clean());
}
/**
* Handle a view exception.
*
* @param \Throwable $e
* @param int $obLevel
* @return void
*
* @throws \Throwable
*/
protected function handleViewException(Throwable $e, $obLevel)
{
while (ob_get_level() > $obLevel) {
ob_end_clean();
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/Engines/CompilerEngine.php
* @param array $data
* @return string
*/
public function get($path, array $data = [])
{
$this->lastCompiled[] = $path;
// If this given view has expired, which means it has simply been edited since
// it was last compiled, we will re-compile the views so we can evaluate a
// fresh copy of the view. We'll pass the compiler the path of the view.
if (! isset($this->compiledOrNotExpired[$path]) && $this->compiler->isExpired($path)) {
$this->compiler->compile($path);
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
try {
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
} catch (ViewException $e) {
if (! str($e->getMessage())->contains(['No such file or directory', 'File does not exist at path'])) {
throw $e;
}
if (! isset($this->compiledOrNotExpired[$path])) {
throw $e;
}
$this->compiler->compile($path);
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
}
$this->compiledOrNotExpired[$path] = true;
array_pop($this->lastCompiled);
return $results;
}
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/View.php
$this->factory->callComposer($this);
$contents = $this->getContents();
// Once we've finished rendering the view, we'll decrement the render count
// so that each section gets flushed out next time a view is created and
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
* @return array
*/
public function gatherData()
{
$data = array_merge($this->factory->getShared(), $this->data);
foreach ($data as $key => $value) {
if ($value instanceof Renderable) {
$data[$key] = $value->render();
}
}
return $data;
}
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/View.php
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
*/
protected function renderContents()
{
// We will keep track of the 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
// no old sections are staying around in the memory of an environment.
$this->factory->decrementRender();
return $contents;
}
/**
* Get the evaluated contents of the view.
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/vendor/illuminate/view/View.php
*
* @return string
*/
protected function allFragments()
{
return collect($this->render(fn () => $this->factory->getFragments()))->implode('');
}
/**
* Get the string contents of the view.
*
* @param callable|null $callback
* @return string
*
* @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
// another view gets rendered in the future by the application developer.
$this->factory->flushStateIfDoneRendering();
return ! is_null($response) ? $response : $contents;
} catch (Throwable $e) {
$this->factory->flushState();
throw $e;
}
}
/**
* Get the contents of the view instance.
*
* @return string
/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/index.php
<?php
echo view(app('sage.view'), app('sage.data'))->render();
/var/www/vhosts/melanoma.org/httpdocs/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;
}
Arguments
"/var/www/vhosts/melanoma.org/httpdocs/wp-content/themes/pegasus/index.php"
/var/www/vhosts/melanoma.org/httpdocs/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';
}
Arguments
"/var/www/vhosts/melanoma.org/httpdocs/wp-includes/template-loader.php"
/var/www/vhosts/melanoma.org/httpdocs/index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
Arguments
"/var/www/vhosts/melanoma.org/httpdocs/wp-blog-header.php"