[wp-trac] [WordPress Trac] #53680: Correct inline documentation about `IMAGETYPE_WEBP` and `IMG_WEBP`

WordPress Trac noreply at wordpress.org
Fri Jul 16 15:30:11 UTC 2021


#53680: Correct inline documentation about `IMAGETYPE_WEBP` and `IMG_WEBP`
--------------------------+----------------------------------------
 Reporter:  desrosj       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  5.8.1
Component:  Media         |    Version:
 Severity:  minor         |   Keywords:  needs-patch good-first-bug
  Focuses:  docs          |
--------------------------+----------------------------------------
 From ticket:35725#comment:195:

 > The `// WebP constants are only defined in PHP 7.1+.`
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/compat.php#L374 comment in the code] suggests that both
 `IMAGETYPE_WEBP` and `IMG_WEBP` were defined in PHP 7.1.
 >
 > According to https://www.php.net/manual/en/function.imagetypes.php and
 https://www.php.net/manual/en/image.constants.php, the `IMG_WEBP` constant
 was available at 7.0.10, so the current comment is misleading.

 This inline comment should be updated to be accurate.

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


More information about the wp-trac mailing list