Error
Class name must be a valid object or a string Error thrown with message "Class name must be a valid object or a string" Stacktrace: #8 Error in /var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php:120 #7 Give\Form\Templates:getTemplateObject in /var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php:104 #6 Give\Form\Templates:getTemplate in /var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Controller/Form.php:141 #5 Give\Controller\Form:loadDonationFormView in /var/www/vhosts/knsf.org/httpdocs/wp-includes/class-wp-hook.php:324 #4 WP_Hook:apply_filters in /var/www/vhosts/knsf.org/httpdocs/wp-includes/class-wp-hook.php:348 #3 WP_Hook:do_action in /var/www/vhosts/knsf.org/httpdocs/wp-includes/plugin.php:517 #2 do_action in /var/www/vhosts/knsf.org/httpdocs/wp-includes/template-loader.php:13 #1 require_once in /var/www/vhosts/knsf.org/httpdocs/wp-blog-header.php:19 #0 require in /var/www/vhosts/knsf.org/httpdocs/index.php:17
Stack frames (9)
8
Error
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php120
7
Give\Form\Templates getTemplateObject
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php104
6
Give\Form\Templates getTemplate
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Controller/Form.php141
5
Give\Controller\Form loadDonationFormView
/var/www/vhosts/knsf.org/httpdocs/wp-includes/class-wp-hook.php324
4
WP_Hook apply_filters
/var/www/vhosts/knsf.org/httpdocs/wp-includes/class-wp-hook.php348
3
WP_Hook do_action
/var/www/vhosts/knsf.org/httpdocs/wp-includes/plugin.php517
2
do_action
/var/www/vhosts/knsf.org/httpdocs/wp-includes/template-loader.php13
1
require_once
/var/www/vhosts/knsf.org/httpdocs/wp-blog-header.php19
0
require
/var/www/vhosts/knsf.org/httpdocs/index.php17
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php
            return $this->templateObjs[$templateId];
        }
 
        $this->templateObjs[$templateId] = $this->getTemplateObject($templateId);
 
        return $this->getTemplateObject($templateId);
    }
 
    /**
     * Get class object.
     *
     * @since 2.7.0
     *
     * @param string $templateId
     *
     * @return Template
     */
    private function getTemplateObject($templateId)
    {
        return new $this->templates[$templateId]();
    }
}
 
Arguments
  1. "Class name must be a valid object or a string"
    
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Form/Templates.php
    }
 
    /**
     * Get Registered form template
     *
     * @since 2.7.0
     *
     * @param string $templateId Template Id. Default to active form template.
     *
     * @return Template
     */
    public function getTemplate($templateId = null)
    {
        $templateId = $templateId ?: FormTemplateUtils::getActiveID();
 
        if (isset($this->templateObjs[$templateId])) {
            return $this->templateObjs[$templateId];
        }
 
        $this->templateObjs[$templateId] = $this->getTemplateObject($templateId);
 
        return $this->getTemplateObject($templateId);
    }
 
    /**
     * Get class object.
     *
     * @since 2.7.0
     *
     * @param string $templateId
     *
     * @return Template
     */
    private function getTemplateObject($templateId)
    {
        return new $this->templates[$templateId]();
    }
}
 
/var/www/vhosts/knsf.org/httpdocs/wp-content/plugins/give/src/Controller/Form.php
    }
 
    /**
     * Load donation form view.
     *
     * @since 2.7.0
     * @since 2.16.2 Co-locate $formTemplate with related conditional and usage.
     * @global WP_Post $post
     */
    public function loadDonationFormView()
    {
        // Handle failed donation error.
        if (FormUtils::canShowFailedDonationError()) {
            add_action('give_pre_form', [$this, 'setFailedTransactionError']);
        }
 
        // Handle donation form.
        if (FormUtils::isViewingForm()) {
            /* @var Template $formTemplate */
            $formTemplate = Give()->templates->getTemplate();
 
            // Set header.
            nocache_headers();
            header('HTTP/1.1 200 OK');
 
            include $formTemplate->getFormView();
            exit();
        }
    }
 
    /**
     * Show failed transaction error on donation form.
     *
     * @since 2.7.0
     */
    public function setFailedTransactionError()
    {
        Give_Notices::print_frontend_notice(
            Give()->templates->getTemplate(FormTemplateUtils::getActiveID())->getFailedDonationMessage(),
            true,
/var/www/vhosts/knsf.org/httpdocs/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/knsf.org/httpdocs/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/knsf.org/httpdocs/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/knsf.org/httpdocs/wp-includes/template-loader.php
<?php
/**
 * Loads the correct template based on the visitor's url
 *
 * @package WordPress
 */
if ( wp_using_themes() ) {
    /**
     * Fires before determining which template to load.
     *
     * @since 1.5.0
     */
    do_action( 'template_redirect' );
}
 
/**
 * Filters whether to allow 'HEAD' requests to generate content.
 *
 * Provides a significant performance bump by exiting before the page
 * content loads for 'HEAD' requests. See #14348.
 *
 * @since 3.5.0
 *
 * @param bool $exit Whether to exit without generating any content for 'HEAD' requests. Default true.
 */
if ( 'HEAD' === $_SERVER['REQUEST_METHOD'] && apply_filters( 'exit_on_http_head', true ) ) {
    exit;
}
 
// Process feeds and trackbacks even if not using themes.
if ( is_robots() ) {
    /**
     * Fired when the template loader determines a robots.txt request.
     *
     * @since 2.1.0
     */
    do_action( 'do_robots' );
    return;
} elseif ( is_favicon() ) {
    /**
/var/www/vhosts/knsf.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
  1. "/var/www/vhosts/knsf.org/httpdocs/wp-includes/template-loader.php"
    
/var/www/vhosts/knsf.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
  1. "/var/www/vhosts/knsf.org/httpdocs/wp-blog-header.php"
    

Environment & details:

Key Value
giveDonationFormInIframe
"1"
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"Apache"
REQUEST_URI
"/give/form-2?giveDonationFormInIframe=1"
USER
"knsf.org_2roccfn7gmp"
HOME
"/var/www/vhosts/knsf.org"
SCRIPT_NAME
"/index.php"
QUERY_STRING
"giveDonationFormInIframe=1"
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_URL
"/give/form-2"
REDIRECT_QUERY_STRING
"giveDonationFormInIframe=1"
REMOTE_PORT
"41758"
SCRIPT_FILENAME
"/var/www/vhosts/knsf.org/httpdocs/index.php"
SERVER_ADMIN
"root@localhost"
CONTEXT_DOCUMENT_ROOT
"/var/www/vhosts/knsf.org/httpdocs"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"http"
DOCUMENT_ROOT
"/var/www/vhosts/knsf.org/httpdocs"
REMOTE_ADDR
"172.70.38.50"
SERVER_PORT
"80"
SERVER_ADDR
"10.142.0.12"
SERVER_NAME
"www.knsf.org"
SERVER_SIGNATURE
""
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
HTTP_CF_EW_VIA
"15"
HTTP_CF_IPCOUNTRY
"US"
HTTP_CDN_LOOP
"cloudflare; loops=1; subreqs=1"
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_CF_VISITOR
"{\"scheme\":\"https\"}"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
HTTP_ACCEPT_ENCODING
"gzip, br"
HTTP_CF_CONNECTING_IP
"18.97.14.91"
HTTP_CF_RAY
"93804705f3f8082d-IAD"
HTTP_CONNECTION
"close"
HTTP_X_ACCEL_INTERNAL
"/internal-nginx-static-location"
HTTP_X_FORWARDED_FOR
"18.97.14.91"
HTTP_X_REAL_IP
"172.70.38.50"
HTTP_HOST
"www.knsf.org"
proxy-nokeepalive
"1"
HTTP_AUTHORIZATION
""
PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
PERL5LIB
"/usr/share/awstats/lib:/usr/share/awstats/plugins"
SCRIPT_URI
"http://www.knsf.org/give/form-2"
SCRIPT_URL
"/give/form-2"
UNIQUE_ID
"aBECdlc7I4nPTOU-XijUrAAAABo"
REDIRECT_STATUS
"200"
REDIRECT_HTTP_AUTHORIZATION
""
REDIRECT_PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY
"0"
REDIRECT_PERL5LIB
"/usr/share/awstats/lib:/usr/share/awstats/plugins"
REDIRECT_SCRIPT_URI
"http://www.knsf.org/give/form-2"
REDIRECT_SCRIPT_URL
"/give/form-2"
REDIRECT_UNIQUE_ID
"aBECdlc7I4nPTOU-XijUrAAAABo"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1745945206.7589
REQUEST_TIME
1745945206
HTTPS
"on"
empty
0. Whoops\Handler\PrettyPageHandler