[wp-trac] [WordPress Trac] #62748: Return results of update_post_meta
WordPress Trac
noreply at wordpress.org
Sat Dec 28 16:25:06 UTC 2024
#62748: Return results of update_post_meta
-------------------------+-----------------------------
Reporter: vahan889 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
Hi Team!
I checked the return types of the update_post_meta function and this fact
was interesting:
- false on failure or if the value passed to the function is the same as
the one that is already in the database.
It would be great to see the difference between cases of failure and the
same value, because there is no way to know if it failed (and maybe needs
to try again) or just didn't update because it had the same value. I think
that before any update using get_post_meta function to check for the same
value is not the best way if it will happen for example in a big loop.
Thanks,
Vahan
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62748>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list