if(isset($_GET['method']) and sanitize_text_field($_GET['method']) == 'ical')
{
$id = sanitize_text_field($_GET['id']);
$post = get_post($id);
if($post->post_type == $this->get_main_post_type() and $post->post_status == 'publish')
{
$occurrence = isset($_GET['occurrence']) ? sanitize_text_field($_GET['occurrence']) : '';
$events = $this->ical_single($id, $occurrence);
$ical_calendar = $this->ical_calendar($events);
* @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;
}
if(isset($_GET['method']) and sanitize_text_field($_GET['method']) == 'ical')
{
$id = sanitize_text_field($_GET['id']);
$post = get_post($id);
if($post->post_type == $this->get_main_post_type() and $post->post_status == 'publish')
{
$occurrence = isset($_GET['occurrence']) ? sanitize_text_field($_GET['occurrence']) : '';
$events = $this->ical_single($id, $occurrence);
$ical_calendar = $this->ical_calendar($events);
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
*
* @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;
}
} 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 );
}
/**
*
* If you wish to plug an action once WP is loaded, use the {@see 'wp_loaded'} hook below.
*
* @since 1.5.0
*/
do_action( 'init' );
// Check site status.
if ( is_multisite() ) {
$file = ms_site_check();
if ( true !== $file ) {
* This file is required in the root directory so WordPress can find it.
* WP is hardcoded to look in its own directory or one directory up for wp-config.php.
*/
require_once dirname(__DIR__) . '/vendor/autoload.php';
require_once dirname(__DIR__) . '/config/application.php';
require_once ABSPATH . 'wp-settings.php';
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_WARNING));
require_once ABSPATH . 'wp-config.php';
} elseif ( @file_exists( dirname( ABSPATH ) . '/wp-config.php' ) && ! @file_exists( dirname( ABSPATH ) . '/wp-settings.php' ) ) {
/** The config file resides one level above ABSPATH but is not part of another installation */
require_once dirname( ABSPATH ) . '/wp-config.php';
} else {
// A config file doesn't exist.
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.
<?php
/**
* WordPress View Bootstrapper
*/
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
ErrorException
|
---|
ErrorException: Trying to get property 'post_type' of non-object at /web-sites/ppl/multisite/web/app/plugins/modern-events-calendar/app/libraries/main.php:3583 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/web-sites/ppl/multisite/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:54) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() (/web-sites/ppl/multisite/web/app/plugins/modern-events-calendar/app/libraries/main.php:3583) at MEC_main->ical() (/web-sites/ppl/multisite/web/wp/wp-includes/class-wp-hook.php:310) at WP_Hook->apply_filters() (/web-sites/ppl/multisite/web/wp/wp-includes/class-wp-hook.php:334) at WP_Hook->do_action() (/web-sites/ppl/multisite/web/wp/wp-includes/plugin.php:517) at do_action() (/web-sites/ppl/multisite/web/wp/wp-settings.php:632) at require_once('/web-sites/ppl/multisite/web/wp/wp-settings.php') (/web-sites/ppl/multisite/web/wp-config.php:9) at require_once('/web-sites/ppl/multisite/web/wp-config.php') (/web-sites/ppl/multisite/web/wp/wp-load.php:55) at require_once('/web-sites/ppl/multisite/web/wp/wp-load.php') (/web-sites/ppl/multisite/web/wp/wp-blog-header.php:13) at require('/web-sites/ppl/multisite/web/wp/wp-blog-header.php') (/web-sites/ppl/multisite/web/index.php:6) |