TypeError
Cannot access offset of type string on string TypeError thrown with message "Cannot access offset of type string on string" Stacktrace: #3 TypeError in /nas/content/live/stemcaastg/wp-content/themes/stem/single-resource.php:87 #2 include in /nas/content/live/stemcaastg/wp-includes/template-loader.php:132 #1 require_once in /nas/content/live/stemcaastg/wp-blog-header.php:19 #0 require in /nas/content/live/stemcaastg/index.php:17
Stack frames (4)
3
TypeError
/single-resource.php87
2
include
/nas/content/live/stemcaastg/wp-includes/template-loader.php132
1
require_once
/nas/content/live/stemcaastg/wp-blog-header.php19
0
require
/nas/content/live/stemcaastg/index.php17
/nas/content/live/stemcaastg/wp-content/themes/stem/single-resource.php
                                <?= get_field("difficulty")["label"]; ?>
                            </div>
                            <div class="cell small-12 medium-1 detail materials">
                                <h2><img src="<?= THEME_URI; ?>/images/icons/materials.svg">Materials</h2>
 
                                <?= get_field("materials"); ?>
                            </div>
                            <div class="cell small-12 medium-1 detail teacher-pack">
                                <h2>Teacher Pack</h2>
 
                                <?= get_field("teacher_pack") ? "YES" : "NO"; ?>
                            </div>
                            <div class="cell small-12 medium-1 detail links">
                                <h2>Links</h2>
 
                                <?php if (have_rows("links")) :
                                    while (have_rows("links")) :
                                        the_row();
                                        $link = get_sub_field("link"); ?>
                                        <a href="<?= $link["url"]; ?>" target="<?= $link["target"] ?>"><?= $link["title"]; ?></a>
                                    <?php endwhile;
                                endif; ?>
 
                                <?php if (get_field("credits")) : ?>
                                    Credit: <?= get_field("credits"); ?>    
                                <?php endif; ?>    
                            </div>
                        </div>
                    </div>
                </div>
            </article>
            
        </div>
                
        <?php endwhile;
    endif; ?>
 
</div>
 
<?php get_footer(); ?>
Arguments
  1. "Cannot access offset of type string on string"
    
/nas/content/live/stemcaastg/wp-includes/template-loader.php
     */
    $template   = apply_filters( 'template_include', $template );
    $is_stringy = is_string( $template ) || ( is_object( $template ) && method_exists( $template, '__toString' ) );
    $template   = $is_stringy ? realpath( (string) $template ) : null;
    if (
        is_string( $template ) &&
        ( str_ends_with( $template, '.php' ) || str_ends_with( $template, '.html' ) ) &&
        is_file( $template ) &&
        is_readable( $template )
    ) {
        /**
         * Fires immediately before including the template.
         *
         * @since 6.9.0
         *
         * @param string $template The path of the template about to be included.
         */
        do_action( 'wp_before_include_template', $template );
 
        include $template;
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
}
 
/nas/content/live/stemcaastg/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. "/nas/content/live/stemcaastg/wp-includes/template-loader.php"
    
/nas/content/live/stemcaastg/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. "/nas/content/live/stemcaastg/wp-blog-header.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"nginx"
REQUEST_URI
"/resource/what-flies/"
USER
"fpm200051"
HOME
"/home/fpm200051"
SCRIPT_FILENAME
"/nas/content/live/stemcaastg/index.php"
REQUEST_SCHEME
"http"
HTTP_X_WPE_SSL
"1"
HTTP_X_WPE_EDGE
"GES"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_ADDR
"127.0.0.1"
REMOTE_PORT
""
HTTP_CF_IPCOUNTRY
"US"
HTTP_VIA
"1.1 pod-225612 (Varnish/trunk)"
HTTP_X_REAL_IP_REMOTE
"172.71.241.116"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])"
PHP_VALUE
"""
upload_max_filesize=50M;\n
post_max_size=100M;\n
"""
PATH_TRANSLATED
"/nas/content/live/stemcaastg/index.php"
CONTENT_TYPE
""
GATEWAY_INTERFACE
"CGI/1.1"
HTTP_CF_CONNECTING_IP
"216.73.216.143, 216.73.216.143, 216.73.216.143"
HTTP_X_WORDPRESS_TYPE
"DEFAULT"
HTTP_CF_VISITOR
"{\"scheme\":\"https\"}"
DOCUMENT_URI
"/index.php"
REDIRECT_STATUS
"200"
HTTP_HOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_WPE_INSTALL_NAME
"stemcaastg"
HTTP_X_WPE_REQUEST_ID
"5c2b3acc21f4b36add518a4a539dd5e1"
HTTP_RAWHOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_IS_BOT
"1"
HTTP_WPE_READONLY
"on"
HTTP_ACCEPT
"*/*"
HTTP_CF_RAY
"9e3549bc0ce70bf5-LHR"
PHP_ADMIN_VALUE
"""
newrelic.enabled=on;\n
newrelic.license=f5aff5719703ed1f23ca0451f6564508513fNRAL;\n
sendmail_path=/bin/sendmail-wrapper.sh 41a244b12278fa6b141d8b61e10ed0b164c77b4a /usr/sbin/sendmail -t -i;\n
syslog.ident=phperr-stemcaastg;\n
newrelic.appname=stemcaastg;\n
newrelic.browser_monitoring.auto_instrument=off;\n
"""
REQUEST_METHOD
"GET"
QUERY_STRING
""
HTTP_CDN_LOOP
"cloudflare; loops=1"
SYSLOG_IDENT
"phperr-stemcaastg"
SERVER_NAME
"staging.stem.caa.mixd.co.uk"
PATH_INFO
""
CONTENT_LENGTH
"0"
IS_WPE
"1"
SERVER_PORT
"80"
HTTP_REFERER
"https://staging.stem.caa.mixd.co.uk/resource/what-flies"
HTTP_X_UA_ORIGINAL
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_X_CACHE_GROUP
"normal"
HTTP_X_WPENGINE_PHP_VERSION
"8.4"
REMOTE_ADDR
"216.73.216.143"
HTTPS
"on"
HTTP_X_FORWARDED_HOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_WPE_LOCAL_SSL
"1"
DOCUMENT_ROOT
"/nas/content/live/stemcaastg"
SCRIPT_NAME
"/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1774686786.0
REQUEST_TIME
1774686785
Key Value
USER
"fpm200051"
HOME
"/home/fpm200051"
SCRIPT_FILENAME
"/nas/content/live/stemcaastg/index.php"
REQUEST_SCHEME
"http"
HTTP_X_WPE_SSL
"1"
HTTP_X_WPE_EDGE
"GES"
SERVER_PROTOCOL
"HTTP/1.1"
SERVER_ADDR
"127.0.0.1"
REMOTE_PORT
""
HTTP_CF_IPCOUNTRY
"US"
HTTP_VIA
"1.1 pod-225612 (Varnish/trunk)"
HTTP_X_REAL_IP_REMOTE
"172.71.241.116"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])"
PHP_VALUE
"""
upload_max_filesize=50M;\n
post_max_size=100M;\n
"""
PATH_TRANSLATED
"/nas/content/live/stemcaastg/index.php"
CONTENT_TYPE
""
GATEWAY_INTERFACE
"CGI/1.1"
HTTP_CF_CONNECTING_IP
"216.73.216.143, 216.73.216.143, 216.73.216.143"
HTTP_X_WORDPRESS_TYPE
"DEFAULT"
HTTP_CF_VISITOR
"{"scheme":"https"}"
DOCUMENT_URI
"/index.php"
REDIRECT_STATUS
"200"
HTTP_HOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_WPE_INSTALL_NAME
"stemcaastg"
HTTP_X_WPE_REQUEST_ID
"5c2b3acc21f4b36add518a4a539dd5e1"
HTTP_RAWHOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_IS_BOT
"1"
HTTP_WPE_READONLY
"on"
HTTP_ACCEPT
"*/*"
HTTP_CF_RAY
"9e3549bc0ce70bf5-LHR"
PHP_ADMIN_VALUE
"""
newrelic.enabled=on;\n
newrelic.license=f5aff5719703ed1f23ca0451f6564508513fNRAL;\n
sendmail_path=/bin/sendmail-wrapper.sh 41a244b12278fa6b141d8b61e10ed0b164c77b4a /usr/sbin/sendmail -t -i;\n
syslog.ident=phperr-stemcaastg;\n
newrelic.appname=stemcaastg;\n
newrelic.browser_monitoring.auto_instrument=off;\n
"""
REQUEST_URI
"/resource/what-flies/"
REQUEST_METHOD
"GET"
QUERY_STRING
""
HTTP_CDN_LOOP
"cloudflare; loops=1"
SYSLOG_IDENT
"phperr-stemcaastg"
SERVER_NAME
"staging.stem.caa.mixd.co.uk"
PATH_INFO
""
CONTENT_LENGTH
"0"
IS_WPE
"1"
SERVER_PORT
"80"
SERVER_SOFTWARE
"nginx"
HTTP_REFERER
"https://staging.stem.caa.mixd.co.uk/resource/what-flies"
HTTP_X_UA_ORIGINAL
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])"
HTTP_ACCEPT_ENCODING
"gzip"
HTTP_X_CACHE_GROUP
"normal"
HTTP_X_WPENGINE_PHP_VERSION
"8.4"
REMOTE_ADDR
"216.73.216.143"
HTTPS
"on"
HTTP_X_FORWARDED_HOST
"staging.stem.caa.mixd.co.uk"
HTTP_X_WPE_LOCAL_SSL
"1"
DOCUMENT_ROOT
"/nas/content/live/stemcaastg"
SCRIPT_NAME
"/index.php"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1774686786.0
REQUEST_TIME
1774686785
0. Whoops\Handler\PrettyPageHandler