[wp-trac] [WordPress Trac] #34437: The image_downsize filter in wp_prepare_attachment_for_js throws an undefined offset notice.

WordPress Trac noreply at wordpress.org
Wed Jun 1 20:40:55 UTC 2016


#34437: The image_downsize filter in wp_prepare_attachment_for_js throws an
undefined offset notice.
-----------------------------------------+------------------------------
 Reporter:  justinbusa                   |       Owner:  joemcgill
     Type:  defect (bug)                 |      Status:  reviewing
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Media                        |     Version:  4.3.1
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+------------------------------
Changes (by joemcgill):

 * keywords:  has-patch dev-feedback => has-patch reporter-feedback
 * owner:   => joemcgill
 * status:  new => reviewing


Comment:

 Good catch @justinbusa. However, wouldn't using `isset()` there make that
 conditional return true if `$downsize[3]` were set to `false` through a
 filter on `image_downsize`? Perhaps using `empty()` would be better?

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


More information about the wp-trac mailing list