Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php:14 Stack trace: #0 /data/websites/webnews/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php(80): Blazemedia\Affiliation\Providers\FrontendServiceProvider->inject() #1 /data/websites/webnews/web/wp/wp-includes/class-wp-hook.php(324): Blazemedia\Affiliation\Providers\FrontendServiceProvider->replaceContent() #2 /data/websites/webnews/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(50): apply_filters() #4 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(25): THEME\ViewModel\Post\Content\SplittedContent->init() #5 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/SingleSplittedContent.php(30): THEME\ViewModel\Post\Content\SplittedContent->__construct() #6 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/Single.php(23): THEME\ViewModel\Post\Templates\SingleSplittedContent->getContent() #7 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(55): THEME\ViewModel\Post\Templates\Single->getPostData() #8 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(28): THEME\ViewModel\Single->setPost() #9 /data/websites/webnews/web/app/themes/webnews/single.php(16): THEME\ViewModel\Single->__construct() #10 /data/websites/webnews/web/wp/wp-includes/template-loader.php(106): include('...') #11 /data/websites/webnews/web/wp/wp-blog-header.php(19): require_once('...') #12 /data/websites/webnews/web/index.php(6): require('...') #13 {main} thrown in /data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php on line 14
Whoops! There was an error.
Whoops \ Exception \ ErrorException (E_ERROR)
Uncaught TypeError: Cannot access offset of type string on string in /data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php:14 Stack trace: #0 /data/websites/webnews/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php(80): Blazemedia\Affiliation\Providers\FrontendServiceProvider->inject() #1 /data/websites/webnews/web/wp/wp-includes/class-wp-hook.php(324): Blazemedia\Affiliation\Providers\FrontendServiceProvider->replaceContent() #2 /data/websites/webnews/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(50): apply_filters() #4 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(25): THEME\ViewModel\Post\Content\SplittedContent->init() #5 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/SingleSplittedContent.php(30): THEME\ViewModel\Post\Content\SplittedContent->__construct() #6 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/Single.php(23): THEME\ViewModel\Post\Templates\SingleSplittedContent->getContent() #7 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(55): THEME\ViewModel\Post\Templates\Single->getPostData() #8 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(28): THEME\ViewModel\Single->setPost() #9 /data/websites/webnews/web/app/themes/webnews/single.php(16): THEME\ViewModel\Single->__construct() #10 /data/websites/webnews/web/wp/wp-includes/template-loader.php(106): include('...') #11 /data/websites/webnews/web/wp/wp-blog-header.php(19): require_once('...') #12 /data/websites/webnews/web/index.php(6): require('...') #13 {main} thrown Whoops\Exception\ErrorException thrown with message "Uncaught TypeError: Cannot access offset of type string on string in /data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php:14 Stack trace: #0 /data/websites/webnews/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php(80): Blazemedia\Affiliation\Providers\FrontendServiceProvider->inject() #1 /data/websites/webnews/web/wp/wp-includes/class-wp-hook.php(324): Blazemedia\Affiliation\Providers\FrontendServiceProvider->replaceContent() #2 /data/websites/webnews/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(50): apply_filters() #4 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Content/SplittedContent.php(25): THEME\ViewModel\Post\Content\SplittedContent->init() #5 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/SingleSplittedContent.php(30): THEME\ViewModel\Post\Content\SplittedContent->__construct() #6 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Post/Templates/Single.php(23): THEME\ViewModel\Post\Templates\SingleSplittedContent->getContent() #7 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(55): THEME\ViewModel\Post\Templates\Single->getPostData() #8 /data/websites/webnews/web/app/themes/webnews/src/ViewModel/Single.php(28): THEME\ViewModel\Single->setPost() #9 /data/websites/webnews/web/app/themes/webnews/single.php(16): THEME\ViewModel\Single->__construct() #10 /data/websites/webnews/web/wp/wp-includes/template-loader.php(106): include('...') #11 /data/websites/webnews/web/wp/wp-blog-header.php(19): require_once('...') #12 /data/websites/webnews/web/index.php(6): require('...') #13 {main} thrown" Stacktrace: #2 Whoops\Exception\ErrorException in /data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php:14 #1 Whoops\Run:handleError in /data/websites/webnews/vendor/filp/whoops/src/Whoops/Run.php:514 #0 Whoops\Run:handleShutdown in [internal]:0
Stack frames (3)
2
Whoops\Exception\ErrorException
/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php14
1
Whoops\Run handleError
/vendor/filp/whoops/src/Whoops/Run.php514
0
Whoops\Run handleShutdown
[internal]0
/data/websites/webnews/web/app/plugins/affiliation/src/Providers/HasFormatsInjector.php
<?php

namespace Blazemedia\Affiliation\Providers;

use Blazemedia\Affiliation\Rendering\RenderResponse;

trait HasFormatsInjector {
    
    protected function inject( string $content, RenderResponse $renderResponse ): string {
 
        $replacements = $renderResponse->toArray();

        foreach ($replacements as $replacement ) {
            $content = str_replace($replacement['html'], $replacement['htmlReplacement'], $content );
        }

        return $content;
    }

}
 
/data/websites/webnews/vendor/filp/whoops/src/Whoops/Run.php
     *
     * @return void
     */
    public function handleShutdown()
    {
        // If we reached this step, we are in shutdown handler.
        // An exception thrown in a shutdown handler will not be propagated
        // to the exception handler. Pass that information along.
        $this->canThrowExceptions = false;
 
        $error = $this->system->getLastError();
        if ($error && Misc::isLevelFatal($error['type'])) {
            // If there was a fatal error,
            // it was not handled in handleError yet.
            $this->allowQuit = false;
            $this->handleError(
                $error['type'],
                $error['message'],
                $error['file'],
                $error['line']
            );
        }
    }
 
 
    /**
     * @param InspectorFactoryInterface $factory
     *
     * @return void
     */
    public function setInspectorFactory(InspectorFactoryInterface $factory)
    {
        $this->inspectorFactory = $factory;
    }
 
    public function addFrameFilter($filterCallback)
    {
        if (!is_callable($filterCallback)) {
            throw new \InvalidArgumentException(sprintf(
                "A frame filter must be of type callable, %s type given.", 
[internal]

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.26.2
REQUEST_URI /corso-di-fotografia-accedi-gratis-a-tempo-limitato/
USER nginx
HOME /var/lib/nginx
HTTP_REFERER https://staging.webnews.it/corso-di-fotografia-accedi-gratis-a-tempo-limitato
HTTP_ACCEPT_ENCODING gzip, br, zstd, deflate
HTTP_USER_AGENT Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_X_FORWARDED_FOR 216.73.216.39
HTTP_HOST staging.webnews.it
HTTP_X_FORWARDED_PORT 443
HTTP_X_FORWARDED_PROTO https
REDIRECT_STATUS 200
SERVER_NAME staging.webnews.it
SERVER_PORT 443
SERVER_ADDR 10.50.50.197
REMOTE_PORT 55602
REMOTE_ADDR 10.50.50.12
GATEWAY_INTERFACE CGI/1.1
HTTPS on
REQUEST_SCHEME https
SERVER_PROTOCOL HTTP/1.0
DOCUMENT_ROOT /data/websites/webnews/web
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /data/websites/webnews/web/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1748639760.9502
REQUEST_TIME 1748639760
WP_ENV staging
WP_HOME https://staging.webnews.it
WP_SITEURL https://staging.webnews.it/wp
WP_DEBUG true
WP_CACHE false
WPLANG it_IT
WP_POST_REVISIONS false
DB_NAME webnews
DB_USER webnewsUSR
DB_PASSWORD M3l4.G4mes.N3ws
DB_HOST 127.0.0.1
GTM_ID_WEBNEWS GTM-PV4S3R4X
GTM_ID_MELABLOG GTM-PV4S3R4X
GTM_ID_GAMESBLOG GTM-PV4S3R4X
SITE_SPECIAL_TAXONOMY special
HTML_PRODUCT_POST_TYPE_SLUG prodotti
DISABLE_WP_CRON true
ACF_PRO_KEY b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5
WP_ALLOW_MULTISITE true
MULTISITE true
SUBDOMAIN_INSTALL true
DOMAIN_CURRENT_SITE staging.webnews.it
PATH_CURRENT_SITE /
SITE_ID_CURRENT_SITE 1
BLOG_ID_CURRENT_SITE 1
OFFERS_POST_TYPE post
OFFERS_LIMIT 2000
AUTH_KEY E094PtbN,/./X6J)N>X}iRr2X@qzrp<)*n!<1kps=WXH11Ho^1)^#,,/N`RQ%4PA
SECURE_AUTH_KEY rek_-EaoK.j{F>G%}^{Kw+npcA[tI&MW0_:3|Liq*E/]U/ve{M`tRW7[,SX-?G|b
LOGGED_IN_KEY Y;LL^L-^5a5nG&?I;e[nj0<5<;&pprgWk9Eq-Ozp>H6DZwl)3LUtdxQJ-b*mXA/w
NONCE_KEY 1R!zPZ.mPoo=[i1B[dUi2a13}0:>G{BToB:OX_(S8zT+PZ7nlEn78.#t0u7x?9)&
AUTH_SALT e+WE5olbqDvW7C[%Fs}d3n#_@8^,Ha<k&}kBL|:t@*Sl2vs#qT(lw`famVOPZ:!F
SECURE_AUTH_SALT Ks7ArUFaxK%!B`mqAsS;{qC,vpR36AiIcb@N1$[2<^SVY|?11$PV&P[PPzta,N<Z
LOGGED_IN_SALT 8lh7Q,HpTM}CMRtES%GVPD--09e!MUsQbinsA0-lS=qiUFfOaC]*,R?W$Po7UMak
NONCE_SALT m%tOV5u+uWm$e4V|4!y,:K_7`-N=m$unEx>SO:VZGMS)Y!h_ln/#zTJAkM)FK7{2
Key Value
WP_ENV staging
WP_HOME https://staging.webnews.it
WP_SITEURL https://staging.webnews.it/wp
WP_DEBUG true
WP_CACHE false
WPLANG it_IT
WP_POST_REVISIONS false
DB_NAME webnews
DB_USER webnewsUSR
DB_PASSWORD M3l4.G4mes.N3ws
DB_HOST 127.0.0.1
GTM_ID_WEBNEWS GTM-PV4S3R4X
GTM_ID_MELABLOG GTM-PV4S3R4X
GTM_ID_GAMESBLOG GTM-PV4S3R4X
SITE_SPECIAL_TAXONOMY special
HTML_PRODUCT_POST_TYPE_SLUG prodotti
DISABLE_WP_CRON true
ACF_PRO_KEY b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5
WP_ALLOW_MULTISITE true
MULTISITE true
SUBDOMAIN_INSTALL true
DOMAIN_CURRENT_SITE staging.webnews.it
PATH_CURRENT_SITE /
SITE_ID_CURRENT_SITE 1
BLOG_ID_CURRENT_SITE 1
OFFERS_POST_TYPE post
OFFERS_LIMIT 2000
AUTH_KEY E094PtbN,/./X6J)N>X}iRr2X@qzrp<)*n!<1kps=WXH11Ho^1)^#,,/N`RQ%4PA
SECURE_AUTH_KEY rek_-EaoK.j{F>G%}^{Kw+npcA[tI&MW0_:3|Liq*E/]U/ve{M`tRW7[,SX-?G|b
LOGGED_IN_KEY Y;LL^L-^5a5nG&?I;e[nj0<5<;&pprgWk9Eq-Ozp>H6DZwl)3LUtdxQJ-b*mXA/w
NONCE_KEY 1R!zPZ.mPoo=[i1B[dUi2a13}0:>G{BToB:OX_(S8zT+PZ7nlEn78.#t0u7x?9)&
AUTH_SALT e+WE5olbqDvW7C[%Fs}d3n#_@8^,Ha<k&}kBL|:t@*Sl2vs#qT(lw`famVOPZ:!F
SECURE_AUTH_SALT Ks7ArUFaxK%!B`mqAsS;{qC,vpR36AiIcb@N1$[2<^SVY|?11$PV&P[PPzta,N<Z
LOGGED_IN_SALT 8lh7Q,HpTM}CMRtES%GVPD--09e!MUsQbinsA0-lS=qiUFfOaC]*,R?W$Po7UMak
NONCE_SALT m%tOV5u+uWm$e4V|4!y,:K_7`-N=m$unEx>SO:VZGMS)Y!h_ln/#zTJAkM)FK7{2
0. Whoops\Handler\PrettyPageHandler