[wp-trac] [WordPress Trac] #41148: Test for ticket 39875 can throw PHP error

WordPress Trac noreply at wordpress.org
Mon Aug 28 10:04:58 UTC 2017


#41148: Test for ticket 39875 can throw PHP error
--------------------------+------------------------------
 Reporter:  schlessera    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.8
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by schlessera):

 The test error happens when some or all of the dependencies
 (`ghostscript`, `imagemagick`, `imagick`) are not properly installed. It
 will result in an empty array being returned by
 `wp_generate_attachment_metadata()`.

 Alternatively to the asserts I added, we could add a check to see whether
 the proper dependencies are installed, and skip the tests with a
 corresponding notice if not.

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


More information about the wp-trac mailing list