Change default gd.jpeg_ignore_warning = 1

Ignoring these warnings apparently works fine (libgd does so in
gdImageCreateJpeg()), but not ignoring them may cause imagecreatefromjpeg()
to fail completely, so it seems reasonable to ignore warnings by default.

Note that this change most likely doesn't constitute a BC break; we're
simply being more resilient with regard to slightly broken JPEGs.

See also the related [bug #72404](https://bugs.php.net/bug.php?id=72404).
This commit is contained in:
Christoph M. Becker 2016-06-15 14:00:18 +02:00
parent 334db3b921
commit c0efb06ee6
3 changed files with 3 additions and 3 deletions

View file

@ -989,7 +989,7 @@ ZEND_GET_MODULE(gd)
/* {{{ PHP_INI_BEGIN */ /* {{{ PHP_INI_BEGIN */
PHP_INI_BEGIN() PHP_INI_BEGIN()
PHP_INI_ENTRY("gd.jpeg_ignore_warning", "0", PHP_INI_ALL, NULL) PHP_INI_ENTRY("gd.jpeg_ignore_warning", "1", PHP_INI_ALL, NULL)
PHP_INI_END() PHP_INI_END()
/* }}} */ /* }}} */

View file

@ -1653,7 +1653,7 @@ zend.assertions = 1
; a gd image. The warning will then be displayed as notices ; a gd image. The warning will then be displayed as notices
; disabled by default ; disabled by default
; http://php.net/gd.jpeg-ignore-warning ; http://php.net/gd.jpeg-ignore-warning
;gd.jpeg_ignore_warning = 0 ;gd.jpeg_ignore_warning = 1
[exif] [exif]
; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.

View file

@ -1653,7 +1653,7 @@ zend.assertions = -1
; a gd image. The warning will then be displayed as notices ; a gd image. The warning will then be displayed as notices
; disabled by default ; disabled by default
; http://php.net/gd.jpeg-ignore-warning ; http://php.net/gd.jpeg-ignore-warning
;gd.jpeg_ignore_warning = 0 ;gd.jpeg_ignore_warning = 1
[exif] [exif]
; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS. ; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.