[wp-trac] [WordPress Trac] #36587: PHPUnit Tests fail with PHP7 and Imagick 3.4.x

WordPress Trac noreply at wordpress.org
Tue Apr 19 07:22:12 UTC 2016


#36587: PHPUnit Tests fail with PHP7 and Imagick 3.4.x
--------------------------+-----------------------------
 Reporter:  alpipego      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Imagick 3.4.0 started supporting PHP7. Presumably Imagick now throws an
 ImagickException where it previously issued a warning. This causes the
 PHPUnit test to throw errors (~290) and ultimately several failures.

 This can be reproduced with the latest development version (at the time of
 writing: [https://github.com/Varying-Vagrant-
 Vagrants/VVV/commit/b26f070df0993712ce4c30680777d82ac41fcd09
 (commit:b26f070)]) of a "naked" VVV.

 At the moment the warnings get surpressed in multiple places, e.g. '''wp-
 admin/includes/image.php:347'''

 {{{
 $exif = @exif_read_data( $file );
 }}}

 This should ultimately be wrapped in a try-catch block, i.e.

 {{{
 try {
     $exif = @exif_read_data( $file );
 } catch(Exception $e) {
     $exif = false;
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36587>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list