Skip to content

fix: PHP 8.4 deprecation error in media pool search (str_getcsv missing $escape parameter)#6481

Merged
gharlan merged 3 commits into5.xfrom
copilot/fix-media-pool-search-error
Apr 12, 2026
Merged

fix: PHP 8.4 deprecation error in media pool search (str_getcsv missing $escape parameter)#6481
gharlan merged 3 commits into5.xfrom
copilot/fix-media-pool-search-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 12, 2026

Searching in the media pool throws an ErrorException on installations where E_DEPRECATED is treated as an exception, caused by str_getcsv() being called without an explicit $escape parameter — whose default value is changing in PHP 8.4.

Change

Explicitly pass '' as the $escape argument, aligning with PHP 8.4's new default and suppressing the deprecation:

// Before
foreach (str_getcsv(trim($value), ' ') as $i => $part) {

// After
foreach (str_getcsv(trim($value), ' ', '"', '') as $i => $part) {

Copilot AI linked an issue Apr 12, 2026 that may be closed by this pull request
…eprecation warning

Agent-Logs-Url: https://github.com/redaxo/core/sessions/1bb06dac-42c5-46c4-a9c7-6efd47810c77

Co-authored-by: gharlan <330436+gharlan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix media pool search to avoid error Fix PHP 8.4 deprecation error in media pool search (str_getcsv missing $escape parameter) Apr 12, 2026
Copilot AI requested a review from gharlan April 12, 2026 12:01
@gharlan gharlan added this to the REDAXO 5.21.1 milestone Apr 12, 2026
@gharlan gharlan marked this pull request as ready for review April 12, 2026 12:19
@gharlan gharlan changed the title Fix PHP 8.4 deprecation error in media pool search (str_getcsv missing $escape parameter) fix: PHP 8.4 deprecation error in media pool search (str_getcsv missing $escape parameter) Apr 12, 2026
@rex-bot rex-bot added the bug label Apr 12, 2026
@gharlan gharlan merged commit 71f6b9b into 5.x Apr 12, 2026
32 of 33 checks passed
@gharlan gharlan deleted the copilot/fix-media-pool-search-error branch April 12, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

Suchfunktion im Medienpool erzeugt Whoops

3 participants