Opened 2 months ago
Last modified 29 hours ago
#62483 reviewing enhancement
maybe_serialize() does support double serialization, but does not the developer if doing so
Reported by: | apermo | Owned by: | audrasjb |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 3.6.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
In #12930 the support of double serialization was added, in order not to break instances where developers used maybe_serialize()
wrong, I recently stumbled upon a case from 2023 where this also happened.
I suggest adding a _doing_it_wrong()
if serialized code was sent to maybe_serialize
in order to make less experienced developers aware of this.
Patch coming
Change History (4)
This ticket was mentioned in PR #7847 on WordPress/wordpress-develop by @apermo.
2 months ago
#1
- Keywords has-patch added
#2
@
2 days ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to audrasjb
- Status changed from new to reviewing
Thanks for the PR, looks good to me at a glance.
I restarted the github actions to ensure phpunit tests are passing.
Moving to 6.8.
@audrasjb commented on PR #7847:
2 days ago
#3
@apermo PHP Unit Tests are failing, this changeset will require some test case update.
Added _doing_it_wrong() to maybe_serialize to notify about double serialization.
Trac ticket: [](https://core.trac.wordpress.org/ticket/62483#ticket)