Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 15, 2026

Motivation

  • Prevent PHP warnings like "Array to string conversion" when PrettyBlocks labels are arrays and avoid deprecation notices when null is passed to str_replace during shortcode/template rendering.

Description

  • In src/Service/EverblockPrettyBlocks.php guard label extraction by normalizing the $config[$labelField] value: if it's an array use the first element, and only cast scalar values to string before using as a label.
  • In src/Service/EverblockTools.php ensure replacements never pass non-scalar or null directly to str_replace by coercing values to safe strings in renderSmartyVarsInArray, getCustomerShortcodes, and getEverShortcodes.
  • These changes avoid array-to-string casts and deprecated null replacements while preserving existing fallback behavior.

Testing

  • No automated tests were run for this change.

Codex Task

@CySSoO CySSoO merged commit 1279751 into master Jan 15, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants