#18845 closed enhancement (fixed)
Introduce __return_null()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.4 | Priority: | normal |
| Severity: | normal | Version: | 3.3 |
| Component: | General | Keywords: | has-patch commit 3.4-early |
| Focuses: | Cc: |
Description
I've recently had some uses for __return_null().
Attachments (1)
Change History (9)
#3
in reply to:
↑ 2
@
15 years ago
- Keywords reporter-feedback removed
Replying to scribu:
Could you list those uses by any chance?
Sure. The transient API and the options API let you short-circuit values using the pre_transient_{transient} and pre_option_{option} filters. __return_null() allows a null short circuit value. __return_false() can't be used because the short circuits use === to check for false.
#4
@
15 years ago
- Keywords commit 3.4-early added
- Milestone changed from Awaiting Review to Future Release
#5
@
14 years ago
I doubt there's much of a use case for returning null but it's nice to have the consistent function.
Note: See
TracTickets for help on using
tickets.
Could you list those uses by any chance?