Whoops \ Exception \ ErrorException (E_WARNING)
unserialize(): Error at offset 3524 of 5743 bytes Whoops\Exception\ErrorException thrown with message "unserialize(): Error at offset 3524 of 5743 bytes" Stacktrace: #10 Whoops\Exception\ErrorException in /data/websites/telefonino/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php:88 #9 unserialize in /data/websites/telefonino/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php:88 #8 Blazemedia\Affiliation\Providers\FrontendServiceProvider:getMetaRenderResponse in /data/websites/telefonino/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php:81 #7 Blazemedia\Affiliation\Providers\FrontendServiceProvider:getRenderResponse in /data/websites/telefonino/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php:43 #6 Blazemedia\Affiliation\Providers\FrontendServiceProvider:register in /data/websites/telefonino/web/wp/wp-includes/class-wp-hook.php:324 #5 WP_Hook:apply_filters in /data/websites/telefonino/web/wp/wp-includes/class-wp-hook.php:348 #4 WP_Hook:do_action in /data/websites/telefonino/web/wp/wp-includes/plugin.php:565 #3 do_action_ref_array in /data/websites/telefonino/web/wp/wp-includes/class-wp.php:830 #2 WP:main in /data/websites/telefonino/web/wp/wp-includes/functions.php:1336 #1 wp in /data/websites/telefonino/web/wp/wp-blog-header.php:16 #0 require in /data/websites/telefonino/web/index.php:6
Stack frames (11)
10
Whoops\Exception\ErrorException
/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php:88
9
unserialize
/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php:88
8
Blazemedia\Affiliation\Providers\FrontendServiceProvider getMetaRenderResponse
/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php:81
7
Blazemedia\Affiliation\Providers\FrontendServiceProvider getRenderResponse
/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php:43
6
Blazemedia\Affiliation\Providers\FrontendServiceProvider register
/web/wp/wp-includes/class-wp-hook.php:324
5
WP_Hook apply_filters
/web/wp/wp-includes/class-wp-hook.php:348
4
WP_Hook do_action
/web/wp/wp-includes/plugin.php:565
3
do_action_ref_array
/web/wp/wp-includes/class-wp.php:830
2
WP main
/web/wp/wp-includes/functions.php:1336
1
wp
/web/wp/wp-blog-header.php:16
0
require
/web/index.php:6
/data/websites/telefonino/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php

        update_post_meta($post->ID, '_blz_affiliation_formats_signature' . $suffix, $signature);
    }

    /**
     * Delete the formats from the post meta
     * @param \WP_Post $post
     */
    protected function deleteMetaRenderResponse(\WP_Post $post): void
    {
        delete_post_meta($post->ID, '_blz_affiliation_formats');
        delete_post_meta($post->ID, '_blz_affiliation_formats_signature');
        delete_post_meta($post->ID, '_blz_affiliation_formats_hook');
        delete_post_meta($post->ID, '_blz_affiliation_formats_signature_hook');
    }

    protected function getMetaRenderResponse(\WP_Post $post, bool $isChild = false): RenderResponse
    {
        $suffix = $isChild ? '_hook' : '';
        $renderResponseBody = unserialize(get_post_meta($post->ID, '_blz_affiliation_formats' . $suffix, true));

        if (empty($renderResponseBody)) return new RenderResponse();

        return new RenderResponse(json_encode($renderResponseBody));
    }

    protected function getMetaSignature(\WP_Post $post, bool $isChild = false): string
    {
        $suffix = $isChild ? '_hook' : '';
        return get_post_meta($post->ID, '_blz_affiliation_formats_signature' . $suffix, true) ?? '';
    }
}
 
/data/websites/telefonino/web/app/plugins/affiliation/src/Providers/Trait/HasPostMetaManager.php

        update_post_meta($post->ID, '_blz_affiliation_formats_signature' . $suffix, $signature);
    }

    /**
     * Delete the formats from the post meta
     * @param \WP_Post $post
     */
    protected function deleteMetaRenderResponse(\WP_Post $post): void
    {
        delete_post_meta($post->ID, '_blz_affiliation_formats');
        delete_post_meta($post->ID, '_blz_affiliation_formats_signature');
        delete_post_meta($post->ID, '_blz_affiliation_formats_hook');
        delete_post_meta($post->ID, '_blz_affiliation_formats_signature_hook');
    }

    protected function getMetaRenderResponse(\WP_Post $post, bool $isChild = false): RenderResponse
    {
        $suffix = $isChild ? '_hook' : '';
        $renderResponseBody = unserialize(get_post_meta($post->ID, '_blz_affiliation_formats' . $suffix, true));

        if (empty($renderResponseBody)) return new RenderResponse();

        return new RenderResponse(json_encode($renderResponseBody));
    }

    protected function getMetaSignature(\WP_Post $post, bool $isChild = false): string
    {
        $suffix = $isChild ? '_hook' : '';
        return get_post_meta($post->ID, '_blz_affiliation_formats_signature' . $suffix, true) ?? '';
    }
}
 
/data/websites/telefonino/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php
 
    public function injectAffiliationStyles(): void
    {
        $this->injectStyles( $this->renderResponse );
    }
 
 
    protected function getRenderResponse(): RenderResponse 
    {
        $post = $this->handleZoneRendering($this->post);
        $post = $this->handleOldShortcode($post);
 
        // Compute current signature and compare with stored to decide cache usage
        $currentSignature = (new Parameters($post))->getSignature();
        $storedSignature  = $this->getMetaSignature($post);
 
        $this->getApiCallForDebug($post, $currentSignature);
 
        if ($currentSignature === $storedSignature) {
            $renderResponse = $this->getMetaRenderResponse($post);
            if (!$renderResponse->isEmpty()) {
                return $renderResponse;
            }
        } else {
            $this->deleteMetaRenderResponse($post);
        }
 
        $renderResponse = $this->getRemoteRenderResponse($post);
 
        if ($renderResponse->isEmpty()) {
            Logger::write('FrontendServiceProvider: Remote render response is empty, returning original content', 'ERROR');                                
        }
        
        return $renderResponse;
    }
 
 
    protected function getRemoteRenderResponse($post): RenderResponse
    {
 
/data/websites/telefonino/web/app/plugins/affiliation/src/Providers/FrontendServiceProvider.php
    {
        $this->disclaimer = Disclaimer::getInstance();
        add_action('wp', [$this, 'register']);
    }
 
 
    public function register(): void
    {
        /// verifica se siamo nel fronted di una single post di uno dei post types configurati
        if (!is_singular( Environment::get('BLAZE_AFFILIATION_POST_TYPES') )) return;
 
        $post = get_post();
 
        if (!$post) return;
 
        $this->post = $post;
 
        // if( !$this->hasFormats( $this->post ) ) return;
 
        $this->renderResponse = $this->getRenderResponse();
 
        add_filter( 'the_content', [ $this, 'injectAffiliationInContent' ], 4, 1 );                
        add_action( 'wp_head',     [ $this, 'injectAffiliationStyles'    ], 20 );
        // Enqueue debug inspector for techteam only
        $this->enqueueDebugInspector($this->renderResponse);
    }
 
    public function injectAffiliationInContent( string $content ): string
    {
        $content = $this->inject($content, $this->renderResponse);
 
        if ($this->disclaimer->getStatus()) {
            $content = $this->disclaimer->printDisclaimer($content);
        }
 
        return $content;
    }
 
 
    public function injectAffiliationStyles(): void
/data/websites/telefonino/web/wp/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.
/data/websites/telefonino/web/wp/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 ] );
/data/websites/telefonino/web/wp/wp-includes/plugin.php
    // Do 'all' actions first.
    if ( isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
        $all_args            = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    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;
    }
 
    $wp_filter[ $hook_name ]->do_action( $args );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Checks if any action has been registered for a hook.
 *
 * When using the `$callback` argument, this function may return a non-boolean value
 * that evaluates to false (e.g. 0), so use the `===` operator for testing the return value.
 *
 * @since 2.5.0
 *
 * @see has_filter() This function is an alias of has_filter().
 *
 * @param string                      $hook_name The name of the action hook.
 * @param callable|string|array|false $callback  Optional. The callback to check for.
 *                                               This function can be called unconditionally to speculatively check
 *                                               a callback that may or may not exist. Default false.
 * @return bool|int If `$callback` is omitted, returns boolean for whether the hook has
 *                  anything registered. When checking a specific function, the priority
/data/websites/telefonino/web/wp/wp-includes/class-wp.php
        $this->init();
 
        $parsed = $this->parse_request( $query_args );
 
        if ( $parsed ) {
            $this->query_posts();
            $this->handle_404();
            $this->register_globals();
        }
 
        $this->send_headers();
 
        /**
         * Fires once the WordPress environment has been set up.
         *
         * @since 2.1.0
         *
         * @param WP $wp Current WordPress environment instance (passed by reference).
         */
        do_action_ref_array( 'wp', array( &$this ) );
    }
}
 
/data/websites/telefonino/web/wp/wp-includes/functions.php
    }
 
    return wp_remote_retrieve_body( $response );
}
 
/**
 * Sets up the WordPress query.
 *
 * @since 2.0.0
 *
 * @global WP       $wp           Current WordPress environment instance.
 * @global WP_Query $wp_query     WordPress Query object.
 * @global WP_Query $wp_the_query Copy of the WordPress Query object.
 *
 * @param string|array $query_vars Default WP_Query arguments.
 */
function wp( $query_vars = '' ) {
    global $wp, $wp_query, $wp_the_query;
 
    $wp->main( $query_vars );
 
    if ( ! isset( $wp_the_query ) ) {
        $wp_the_query = $wp_query;
    }
}
 
/**
 * Retrieves the description for the HTTP status.
 *
 * @since 2.3.0
 * @since 3.9.0 Added status codes 418, 428, 429, 431, and 511.
 * @since 4.5.0 Added status codes 308, 421, and 451.
 * @since 5.1.0 Added status code 103.
 * @since 6.6.0 Added status code 425.
 *
 * @global array $wp_header_to_desc
 *
 * @param int $code HTTP status code.
 * @return string Status description if found, an empty string otherwise.
 */
/data/websites/telefonino/web/wp/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';
 
}
 
/data/websites/telefonino/web/index.php
<?php
/**
 * WordPress View Bootstrapper
 */
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE nginx/1.26.2
REQUEST_URI /notizie/robot-aspirapolvere-slim-con-kit-di-accessori-sconto-top-su-amazon
USER nginx
HOME /var/lib/nginx
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.51
HTTP_HOST staging.telefonino.net
HTTP_X_FORWARDED_PORT 443
HTTP_X_FORWARDED_PROTO https
REDIRECT_STATUS 200
SERVER_NAME staging.telefonino.net
SERVER_PORT 443
SERVER_ADDR 10.50.50.197
REMOTE_PORT 46386
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/telefonino/web
DOCUMENT_URI /index.php
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING
SCRIPT_FILENAME /data/websites/telefonino/web/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1774951898.4254
REQUEST_TIME 1774951898
DB_NAME telefonino
DB_USER telefoninoUSR
DB_PASSWORD .T3lefon!n0.
DB_HOST localhost
DB_PREFIX wp_
GTM_ID GTM-PV4S3R4X
ASSETS_DIR /app/themes/telefonino/assets
FORMINATOR_NEWSLETTER_FORM_ID 404256
WP_ENV staging
WP_HOME https://staging.telefonino.net
WP_SITEURL https://staging.telefonino.net/wp
WP_THEMEPATH https://staging.telefonino.net/app/themes/telefonino/
WP_EMAIL no-reply@telefonino.net
WP_DEBUG true
WP_CACHE false
DISABLE_WP_CRON true
WP_MEMORY_LIMIT 512M
WP_POST_REVISIONS false
AUTH_KEY &uq&p$ypr;Yr7DiuR3ECXHD14o0M562d|MYpdP>;X.fm9q@pOvJ^D-/w9uC+`q1z
SECURE_AUTH_KEY *kkFy7N_9]uNEIk%lG{zxv|aT/_BSV:-|l+C{NU|2/|-HJqP82K[e7mg=>qX!Mef
LOGGED_IN_KEY RJ%0[1(1^$bKjvj^IXV!e[%+yD;d1_fl/)Q4/SdSO>>np:+=`+Es9UbS]dOg89J=
NONCE_KEY 1RTq(</}tixMOUC^n44?.,xA!,n-ms-6J@,LS@/aVJAk8<Ofvjaeu[1iPzU,oG{q
AUTH_SALT ,ptA@)1JrYHO3CjZxYcqX_v<7@X1>2*v7K<Ul2?ofl2qP<>!qzjkf)$Zu&iovz-k
SECURE_AUTH_SALT GA/axYdH9ls=wCH#1XwF9P&E<jOP^d4VKlFF?>vb4Czz3v$jz0dl@DES]&A3D_`^
LOGGED_IN_SALT tWjy]Qb,XQ9%th/9Oi1D;E/L@z-Oo5<TfTSVD-obR;MTyal!SWCcez=fnAGNFlFL
NONCE_SALT aMNhCOYLU+(1URHOor&2^Ux0}9%5eQ1B;MRZ({=XMcw!+42NI3Gx?;,L&Y;yYni]
ACF_PRO_KEY b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5
Key Value
DB_NAME telefonino
DB_USER telefoninoUSR
DB_PASSWORD .T3lefon!n0.
DB_HOST localhost
DB_PREFIX wp_
GTM_ID GTM-PV4S3R4X
ASSETS_DIR /app/themes/telefonino/assets
FORMINATOR_NEWSLETTER_FORM_ID 404256
WP_ENV staging
WP_HOME https://staging.telefonino.net
WP_SITEURL https://staging.telefonino.net/wp
WP_THEMEPATH https://staging.telefonino.net/app/themes/telefonino/
WP_EMAIL no-reply@telefonino.net
WP_DEBUG true
WP_CACHE false
DISABLE_WP_CRON true
WP_MEMORY_LIMIT 512M
WP_POST_REVISIONS false
AUTH_KEY &uq&p$ypr;Yr7DiuR3ECXHD14o0M562d|MYpdP>;X.fm9q@pOvJ^D-/w9uC+`q1z
SECURE_AUTH_KEY *kkFy7N_9]uNEIk%lG{zxv|aT/_BSV:-|l+C{NU|2/|-HJqP82K[e7mg=>qX!Mef
LOGGED_IN_KEY RJ%0[1(1^$bKjvj^IXV!e[%+yD;d1_fl/)Q4/SdSO>>np:+=`+Es9UbS]dOg89J=
NONCE_KEY 1RTq(</}tixMOUC^n44?.,xA!,n-ms-6J@,LS@/aVJAk8<Ofvjaeu[1iPzU,oG{q
AUTH_SALT ,ptA@)1JrYHO3CjZxYcqX_v<7@X1>2*v7K<Ul2?ofl2qP<>!qzjkf)$Zu&iovz-k
SECURE_AUTH_SALT GA/axYdH9ls=wCH#1XwF9P&E<jOP^d4VKlFF?>vb4Czz3v$jz0dl@DES]&A3D_`^
LOGGED_IN_SALT tWjy]Qb,XQ9%th/9Oi1D;E/L@z-Oo5<TfTSVD-obR;MTyal!SWCcez=fnAGNFlFL
NONCE_SALT aMNhCOYLU+(1URHOor&2^Ux0}9%5eQ1B;MRZ({=XMcw!+42NI3Gx?;,L&Y;yYni]
ACF_PRO_KEY b3JkZXJfaWQ9NzQ2MTV8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE2LTAyLTA5IDExOjQ5OjE5
0. Whoops\Handler\PrettyPageHandler