Whoops \ Exception \ ErrorException (E_NOTICE)
Undefined index: category Whoops\Exception\ErrorException thrown with message "Undefined index: category" Stacktrace: #5 Whoops\Exception\ErrorException in /home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/Controllers/Hartfordcare/Ajax.php:112 #4 Whoops\Run:handleError in /home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/Controllers/Hartfordcare/Ajax.php:112 #3 Hartfordcare\Ajax:posts in /home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/views/front-page.php:121 #2 include in /home/designlab/webapps/app-hartfordcare-staging/public/wp-includes/template-loader.php:106 #1 require_once in /home/designlab/webapps/app-hartfordcare-staging/public/wp-blog-header.php:19 #0 require in /home/designlab/webapps/app-hartfordcare-staging/public/index.php:17
Stack frames (6)
5
Whoops\Exception\ErrorException
/Hartfordcare/Ajax.php112
4
Whoops\Run handleError
/Hartfordcare/Ajax.php112
3
Hartfordcare\Ajax posts
/home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/views/front-page.php121
2
include
/home/designlab/webapps/app-hartfordcare-staging/public/wp-includes/template-loader.php106
1
require_once
/home/designlab/webapps/app-hartfordcare-staging/public/wp-blog-header.php19
0
require
/home/designlab/webapps/app-hartfordcare-staging/public/index.php17
/home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/Controllers/Hartfordcare/Ajax.php
    {
        if (have_rows('carehome_brochure', (int)$_GET['brochure'])) {
            the_row();
            $brochure = get_sub_field('brochure_download'); //(int)$_GET['brochure']
            $path = $brochure['url'];
 
            $_SERVER['HTTP_HOST'] ??= $this->substring(get_site_url(), '://');
            $response = new BinaryFileResponse(ABSPATH . $this->substring($path, $_SERVER['HTTP_HOST'] . '/'));
            $response->headers->set('Content-Type', $brochure['mime_type']);
            $response->setContentDisposition(
                ResponseHeaderBag::DISPOSITION_ATTACHMENT,
                $brochure['filename'],
            );
            $response->send();
        }
    }
 
    public function posts($posts = null, $slider = false): void
    {
        if ($_GET['category'] != 'null') {
            $taxQuery = [
                'tax_query' => [
                    'relation' => 'OR',
                    [
                        'taxonomy' => 'category',
                        'field' => 'term_id',
                        'terms' => [$_GET['category'] ?? null],
                    ]
                ],
                'paged' => $_GET['page'] ?? -1
            ];
        } else {
            $taxQuery = [
                'paged' => $_GET['page'] ?? -1
            ];
        }
        if (!$posts) {
            $posts = (new CustomPostTypes())->query('post')->orderBy('date', 'desc')->get($taxQuery);
        }
 
Arguments
  1. "Undefined index: category"
    
/home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/Controllers/Hartfordcare/Ajax.php
    {
        if (have_rows('carehome_brochure', (int)$_GET['brochure'])) {
            the_row();
            $brochure = get_sub_field('brochure_download'); //(int)$_GET['brochure']
            $path = $brochure['url'];
 
            $_SERVER['HTTP_HOST'] ??= $this->substring(get_site_url(), '://');
            $response = new BinaryFileResponse(ABSPATH . $this->substring($path, $_SERVER['HTTP_HOST'] . '/'));
            $response->headers->set('Content-Type', $brochure['mime_type']);
            $response->setContentDisposition(
                ResponseHeaderBag::DISPOSITION_ATTACHMENT,
                $brochure['filename'],
            );
            $response->send();
        }
    }
 
    public function posts($posts = null, $slider = false): void
    {
        if ($_GET['category'] != 'null') {
            $taxQuery = [
                'tax_query' => [
                    'relation' => 'OR',
                    [
                        'taxonomy' => 'category',
                        'field' => 'term_id',
                        'terms' => [$_GET['category'] ?? null],
                    ]
                ],
                'paged' => $_GET['page'] ?? -1
            ];
        } else {
            $taxQuery = [
                'paged' => $_GET['page'] ?? -1
            ];
        }
        if (!$posts) {
            $posts = (new CustomPostTypes())->query('post')->orderBy('date', 'desc')->get($taxQuery);
        }
 
/home/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/views/front-page.php
        <div class="col-sm-12">
          <div class="infoCont">
            <h3 class="sectionMinorTitle">Our News</h3>
          </div>
        </div>
      </div>
      <div class="row">
        <div class="slider news-white">
            <?php
            $posts = (new CustomPostTypes())->query('post')->orderBy('date', 'desc')->get(['tag' => 'featured',
                'tax_query' => [
                    [
                        'taxonomy' => 'category',
                        'field' => 'slug',
                        'terms' => ['career-stories'],
                        'operator' => 'NOT IN'
                    ],
                ]
            ]);
            \Hartfordcare\Ajax::$instance->posts($posts, true);
            ?>
        </div>
      </div>
      <div class="row">
        <div class="col-sm-12">
          <a class="button"
             href="<?php get_template_directory() ?>/news-views/">View All</a>
        </div>
      </div>
    </div>
  </section>

  <section class="sectionTeal">
    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-12">
          <div class="container">
              <?php if (have_rows('simple_reviews')): ?>
              <?php while (have_rows('simple_reviews')) :
              the_row(); ?>
/home/designlab/webapps/app-hartfordcare-staging/public/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/designlab/webapps/app-hartfordcare-staging/public/wp-content/themes/hartfordcare/views/front-page.php"
    
/home/designlab/webapps/app-hartfordcare-staging/public/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/designlab/webapps/app-hartfordcare-staging/public/wp-includes/template-loader.php"
    
/home/designlab/webapps/app-hartfordcare-staging/public/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/designlab/webapps/app-hartfordcare-staging/public/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx/1.19.3"
REQUEST_URI
"/"
USER
"designlab"
HOME
"/home/designlab"
HTTP_CONNECTION
"Keep-Alive"
HTTP_HOST
"hartfordcare.designlab.agency"
HTTP_ACCEPT_ENCODING
"br,gzip"
HTTP_IF_MODIFIED_SINCE
"Wed, 19 Jan 2022 17:17:04 GMT"
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/)"
REDIRECT_STATUS
"200"
SERVER_NAME
"hartfordcare.designlab.agency"
SERVER_PORT
"443"
SERVER_ADDR
"10.16.0.10"
REMOTE_PORT
"36836"
REMOTE_ADDR
"3.238.180.255"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/1.1"
DOCUMENT_URI
"/index.php"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
DOCUMENT_ROOT
"/home/designlab/webapps/app-hartfordcare-staging/public"
SCRIPT_FILENAME
"/home/designlab/webapps/app-hartfordcare-staging/public/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1652927796.4542
REQUEST_TIME
1652927796
empty
0. Whoops\Handler\PrettyPageHandler