[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
Tue Aug 11 16:24:10 UTC 2015


#33326: Site Icon: Check return of wp_get_attachment_image_src in get_site_icon_url
------------------------------+-----------------------
 Reporter:  MikeHansenMe      |       Owner:  obenland
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  4.3
Component:  Customize         |     Version:  trunk
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------
Changes (by obenland):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"33606"]:
 {{{
 #!CommitTicketReference repository="" revision="33606"
 Site Icon: Improvements to Site Icon API.

 * Only call `get_blog_option()` when there is a blog id and we're in
 Mulitsite. If there is no blog id the request is for the current blog.
 * Check return value of `wp_get_attachment_image_src()` before getting the
 URL since it could be `false`.
 * Use `{bool}` rather than `!!` to return a boolean value.

 Props MikeHansenMe, obenland.
 Fixes #33326.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33326#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list