Skip to content

Commit

Permalink
Fix #14420: system warning in make_captcha
Browse files Browse the repository at this point in the history
Per PHP documentation [1], second param of imagejpeg() should be set to
null to output the image directly.

Thanks to Andrew Kovalenko for noticing and providing fix for the issue

[1] http://php.net/imagejpeg
  • Loading branch information
dregad committed Jun 26, 2012
1 parent 3de78aa commit 1b79a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion make_captcha_img.php
Expand Up @@ -246,7 +246,7 @@ function make_captcha( $private_key )
$x += (int)($size + ($this->minsize / 5));
}
header('Content-type: image/jpeg');
@ImageJPEG($image, '', $this->jpegquality);
@ImageJPEG($image, null, $this->jpegquality);
@ImageDestroy($image);
if($this->debug) echo "\n<br />-Captcha-Debug: Destroy Imagestream.";
}
Expand Down

0 comments on commit 1b79a04

Please sign in to comment.