[wp-trac] [WordPress Trac] #33326: Site Icon: Check return of wp_get_attachment_image_src in get_site_icon_url
WordPress Trac
noreply at wordpress.org
Mon Aug 10 17:36:31 UTC 2015
#33326: Site Icon: Check return of wp_get_attachment_image_src in get_site_icon_url
--------------------------+-----------------------------
Reporter: MikeHansenMe | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
In get_site_icon_url it uses wp_get_attachment_image_src which can return
false. So we can check for that before assigning $url = $url_data[0];
Also in has_site_icon we are using !! which we have never used in core. We
can just use (bool) instead.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33326>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list