Opened 14 years ago
Closed 14 years ago
#23170 closed defect (bug) (fixed)
PHP Notice On _remove_theme_support() function
| Reported by: | alex-ye | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.6 |
| Component: | Warnings/Notices | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description (last modified by )
I create a ticket about this bug in #22246 but as I test the PHP notice is still exists even after Nacin patch .
Attachments (3)
Change History (11)
#2
follow-up:
↓ 4
@
14 years ago
- Milestone Awaiting Review → 3.6
theme.php.2.patch would re-introduce a part of [22274], which was reverted in [22312] and replaced with [22313].
However, seems like the check in [22313] was inaccurate: did_action() can only return an integer. 23170.patch fixes the condition.
#4
in reply to: ↑ 2
;
follow-up:
↓ 5
@
14 years ago
Replying to SergeyBiryukov:
However, seems like the check in [22313] was inaccurate:
did_action()can only return an integer. 23170.patch fixes the condition.
Good , but I have a tiny question why we check $support[0]wp-head-callback in line 1495 it is not a boolean var and we should use empty() or isset() ... right ?!
And what about the line 1505 we don't check $support[0]wp-head-callback at all , so what is the difference ?!
after all I want to learn more from you guys :)
#5
in reply to: ↑ 4
@
14 years ago
Replying to alex-ye:
why we check $support[0]wp-head-callback in line 1495 it is not a boolean var and we should use empty() or isset() ... right ?!
Yes, we just skip !empty() for brevity, since a non-empty string is considered true:
http://php.net/manual/en/language.types.boolean.php
And what about the line 1505 we don't check $support[0]wp-head-callback at all , so what is the difference ?!
I guess the difference is that unlike custom header, custom background has a default callback:
http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/theme.php#L1353
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Using isset() to avoid the PHP notice .