uxcxo
Forum Replies Created
-
Hi,
That’s great to hear, thank you for looking into this and for implementing the fix. I appreciate the support.
Hi,
Thank you for testing. Looking at the environment details again: my original report listed PHP 8.3.30, which differs from the PHP 8.4.12 used in your test environment. WordPress version (7.0.2) and Post Snippets version (4.2.1) match.
To clarify the snippet’s history: variables have never been added to this snippet — it was created without variables from the start and has never had any set or removed.
I confirmed a fix works by manually patching line 723 in PSallSnippets.php (
$atts = $attributes["snippetVars"] ?? [];) and line 44 in Shortcode.php (foreach ((array) $atts as $key => $val) {) — after applying this, the warnings disappear immediately. This suggests that in my case,$attributes["snippetVars"]is eithernullor the key is missing entirely when the shortcode is rendered.The PHP version difference (8.3.30 vs 8.4.12) may or may not be relevant, but it’s the only environment difference I can identify. I’ll leave this information here in case it’s useful. Thank you again for looking into this.