From: Mukunda Modell Date: Wed, 10 May 2017 21:43:21 +0000 (-0500) Subject: Check for index to exist before accessing it. X-Git-Tag: 1.31.0-rc.0~3278 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=50e0334a07e73984bc2b50f3bc0e21b3ed4b684e;p=lhc%2Fweb%2Fwiklou.git Check for index to exist before accessing it. This fixes "Notice: Undefined index: quality ..." Bug: T164983 Change-Id: If72c40aeaf0ee5727e21f9fe4dac92c12436ce41 --- diff --git a/includes/media/Jpeg.php b/includes/media/Jpeg.php index 582269941b..29f0d7c606 100644 --- a/includes/media/Jpeg.php +++ b/includes/media/Jpeg.php @@ -205,7 +205,7 @@ class JpegHandler extends ExifBitmapHandler { // we'll also add TinyRGB profile to images lacking a profile, but // only if they're not low quality (which are meant to save bandwith // and we don't want to increase the filesize by adding a profile) - if ( $params['quality'] > 30 ) { + if ( isset( $params['quality'] ) && $params['quality'] > 30 ) { $profiles[] = '-'; }