ErrorException (E_WARNING)
Undefined variable $fileUploadSettings ErrorException thrown with message "Undefined variable $fileUploadSettings" Stacktrace: #5 ErrorException in /home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/admin/puppy-files/fileuploadsettings.php:17 #4 errorHandler in /home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/admin/puppy-files/fileuploadsettings.php:17 #3 include_once in /home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/page.php:55 #2 include in /home/breederuser/htdocs/breederpress.com/wp-includes/template-loader.php:106 #1 require_once in /home/breederuser/htdocs/breederpress.com/wp-blog-header.php:19 #0 require in /home/breederuser/htdocs/breederpress.com/index.php:17
Stack frames (6)
5
ErrorException
/admin/puppy-files/fileuploadsettings.php17
4
errorHandler
/admin/puppy-files/fileuploadsettings.php17
3
include_once
/page.php55
2
include
/home/breederuser/htdocs/breederpress.com/wp-includes/template-loader.php106
1
require_once
/home/breederuser/htdocs/breederpress.com/wp-blog-header.php19
0
require
/home/breederuser/htdocs/breederpress.com/index.php17
/home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/admin/puppy-files/fileuploadsettings.php
<?php
// Ensure $context and $timber_post are available in this file
global $context, $timber_post;
 
// Ensure $fileUploadSettings is defined
//FIXME this just messes with my pages if I uncomment??
// $fileUploadSettings = $context['options']['upload_settings'] ?? [
//     'type' => 'off',
//     'ftp_host_name' => '',
//     'ftp_port' => 21,
//     'ftp_username' => '',
//     'ftp_password' => '',
//     'page_password' => ''
// ];
 
// Upload page FTP settings
if ($fileUploadSettings['type'] !== 'off') {
    $fileuploader = new PuppyPress_Fileupload($fileUploadSettings['type']);
    if (!empty($_FILES)) {
        $fileuploader->upload();
        die();
    }
 
    if ($fileUploadSettings['type'] == 'ftp') {
        $ftpConnection = $fileuploader->setFtpCredentials(
            $fileUploadSettings['ftp_host_name'],
            $fileUploadSettings['ftp_port'],
            $fileUploadSettings['ftp_username'],
            $fileUploadSettings['ftp_password']
        )->getFtpConnection();
        // The below line seems to give warning: "ftp_close(): SSL_read on shutdown:"
        // ftp_close($ftpConnection);
    }
 
    // Password protect Upload page
    if (!empty($fileUploadSettings['page_password'])) {
        if (empty($_POST)) {
            $timber_post->post_name = 'upload-protected';
        } else {
            if ($_POST['page_password'] != $fileUploadSettings['page_password']) {
Arguments
  1. "Undefined variable $fileUploadSettings"
    
/home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/admin/puppy-files/fileuploadsettings.php
<?php
// Ensure $context and $timber_post are available in this file
global $context, $timber_post;
 
// Ensure $fileUploadSettings is defined
//FIXME this just messes with my pages if I uncomment??
// $fileUploadSettings = $context['options']['upload_settings'] ?? [
//     'type' => 'off',
//     'ftp_host_name' => '',
//     'ftp_port' => 21,
//     'ftp_username' => '',
//     'ftp_password' => '',
//     'page_password' => ''
// ];
 
// Upload page FTP settings
if ($fileUploadSettings['type'] !== 'off') {
    $fileuploader = new PuppyPress_Fileupload($fileUploadSettings['type']);
    if (!empty($_FILES)) {
        $fileuploader->upload();
        die();
    }
 
    if ($fileUploadSettings['type'] == 'ftp') {
        $ftpConnection = $fileuploader->setFtpCredentials(
            $fileUploadSettings['ftp_host_name'],
            $fileUploadSettings['ftp_port'],
            $fileUploadSettings['ftp_username'],
            $fileUploadSettings['ftp_password']
        )->getFtpConnection();
        // The below line seems to give warning: "ftp_close(): SSL_read on shutdown:"
        // ftp_close($ftpConnection);
    }
 
    // Password protect Upload page
    if (!empty($fileUploadSettings['page_password'])) {
        if (empty($_POST)) {
            $timber_post->post_name = 'upload-protected';
        } else {
            if ($_POST['page_password'] != $fileUploadSettings['page_password']) {
/home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/page.php
}
 
if (in_array($timber_post->slug, ['newsletter', 'contact', 'delivery'])) {
    if (!empty($_POST)) {
        $contactSubmissions = new PuppyContactSubmissions;
        $contactSubmissions->submit($timber_post->slug);
    }
}
 
// Delivery page settings
if ($timber_post->post_name == 'delivery') {
    $deliveryFormType = $context['options']['delivery']['form_type'];
    if (isset($deliveryFormType['disabled'])) {
        Timber::render('404.twig', $context);
        die();
    }
}
 
// Include the file upload settings file
include_once __DIR__ . '/admin/puppy-files/fileuploadsettings.php';
 
$args = array(
    'post_type' => 'post',
    'meta_key' => 'show_on_page',
    'meta_query' => array(
        array(
            'key' => 'show_on_page',
            'value' => $timber_post->ID,
            'compare' => 'LIKE',
        ),
    )
);
// $featuredNews = new WP_Query( $args );
$featuredNews = Timber::get_posts($args);
$featuredNews = array_filter($featuredNews->to_array(), function ($news) {
    $dateNow = date('Y-m-d H:i:s', current_time('timestamp'));
    $start_time = get_post_meta($news->ID, 'display_time_start_time', true);
    $end_time = get_post_meta($news->ID, 'display_time_end_time', true);
 
    return $start_time <= $dateNow and $end_time >= $dateNow;
Arguments
  1. "/home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/admin/puppy-files/fileuploadsettings.php"
    
/home/breederuser/htdocs/breederpress.com/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
  1. "/home/breederuser/htdocs/breederpress.com/wp-content/themes/pupcart-theme-webhookfix/page.php"
    
/home/breederuser/htdocs/breederpress.com/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. "/home/breederuser/htdocs/breederpress.com/wp-includes/template-loader.php"
    
/home/breederuser/htdocs/breederpress.com/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. "/home/breederuser/htdocs/breederpress.com/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx/1.21.4"
REQUEST_URI
"/"
USER
"breederuser"
HOME
"/home/breederuser"
HTTP_ACCEPT_ENCODING
"br,gzip"
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_USER_AGENT
"CCBot/2.0 (https://commoncrawl.org/faq/)"
HTTP_CONNECTION
"close"
HTTP_X_FORWARDED_FOR
"44.221.66.130"
HTTP_X_REAL_IP
"44.221.66.130"
HTTP_X_FORWARDED_HOST
"breederpress.com"
HTTP_HOST
"breederpress.com"
PHP_VALUE
"""
\n
error_log=/home/breederuser/logs/php/error.log;\n
memory_limit=512M;\n
max_execution_time=60;\n
max_input_time=60;\n
max_input_vars=10000;\n
post_max_size=64M;\n
upload_max_filesize=512M;\n
display_errors=off;
"""
HTTPS
"on"
MGT
"1"
GEOIP_LONGITUDE
"-117.1649"
GEOIP_LATITUDE
"32.8072"
GEOIP_CITY_CONTINENT_CODE
"NA"
GEOIP_POSTAL_CODE
"92111"
GEOIP_CITY
"San Diego"
GEOIP_REGION
"CA"
GEOIP_CITY_COUNTRY_NAME
"United States"
GEOIP_CITY_COUNTRY_CODE3
"USA"
GEOIP_CITY_COUNTRY_CODE
"US"
GEOIP_COUNTRY_NAME
"United States"
GEOIP_COUNTRY_CODE3
"USA"
GEOIP_COUNTRY_CODE
"US"
REDIRECT_STATUS
"200"
SERVER_NAME
"breederpress.com"
SERVER_PORT
"443"
SERVER_ADDR
"127.0.0.1"
REMOTE_PORT
""
REMOTE_ADDR
"44.221.66.130"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
DOCUMENT_ROOT
"/home/breederuser/htdocs/breederpress.com/"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
SCRIPT_FILENAME
"/home/breederuser/htdocs/breederpress.com/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1718887425.6761
REQUEST_TIME
1718887425
empty
0. Whoops\Handler\PrettyPageHandler