#60241 closed defect (bug) (fixed)
Revert usage of str_contains() in older bundled themes
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.4.3 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Bundled Theme | Keywords: | |
| Focuses: | Cc: |
Description
Background: #58206.
In [55988], instances of false !== strpos( ... ) were replaced with str_contains() in core files, including the Twenty Twenty and Twenty Seventeen bundled themes.
As pointed out by @poena, the polyfill for str_contains() is only available in WordPress 5.9 or later, while Twenty Twenty supports WordPress 4.7 and PHP 5.2.4, where the use of str_contains() causes fatal errors. This applies to Twenty Seventeen too.
Full list of changes that should be reverted: [55988/trunk/src/wp-content/themes].
Change History (14)
#5
@
2 years ago
Thanks. #58012 avoided changing to str_starts_with in bundled themes, but I apparently missed the switch to str_contains.
#6
@
2 years ago
@desrosj @onemaggie I think we need to release new versions of these themes, outside the normal release cycle, since the issue caused fatal errors.
#7
@
2 years ago
Thanks for catching and working on this all!
I agree, an out of cycle release makes sense. I'm going to work on that now!
#8
@
2 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Reopening because if there are additional changes to these themes in trunk, it may make more sense to backport the changes and release from the 6.4 branch.
#12
@
2 years ago
- Milestone changed from 6.5 to 6.4.3
Adjusting the version since the changes are being backported.
#13
@
2 years ago
These themes have been released to the world: https://make.wordpress.org/core/2024/01/16/twenty-twenty-one-twenty-twenty-and-twenty-seventeen-updates-now-available/.
#14
@
2 years ago
I added a link on the ticket number in the Twenty Seventeen changelog and mentioned the earlier change from #58206 under version 3.3.
However, I cannot edit the other two changelogs (fixing the 60241 link and mentioning the change two versions earlier).
In 57275: