View Issue Details

IDProjectCategoryView StatusLast Update
0014420mantisbtbugtrackerpublic2014-09-23 18:05
ReporterAndrew Kovalenko Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDebian GNU/Linux 6.0 
Target Version1.2.12Fixed in Version1.2.12 
Summary0014420: captcha error
Description

Debian GNU/Linux 6.0
nginx + php-fpm 5.4.4

SYSTEM WARNING: 'imagejpeg(): Filename cannot be empty' in '/opt/mantis/make_captcha_img.php' line 249

Second parameter in "imagejpeg" cannot be empty string http://php.net/imagejpeg
See patch in attach

Tagspatch
Attached Files
mypatch.patch (503 bytes)   
Index: make_captcha_img.php
===================================================================
--- make_captcha_img.php	(revision 5752)
+++ make_captcha_img.php	(working copy)
@@ -249,7 +249,7 @@
 					$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.";
 			}
mypatch.patch (503 bytes)   

Relationships

related to 0015721 closedgrangeway Functionality to consider porting to master-2.0.x 
has duplicate 0014499 closedatrol singup_page.php does not display visual captcha properly 

Activities

dregad

dregad

2012-06-26 06:55

developer   ~0032184

Thanks for the bug report

grangeway

grangeway

2013-04-05 17:56

reporter   ~0036160

Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch

Related Changesets

MantisBT: master-1.2.x 1b79a041

2012-06-25 23:42

dregad


Details Diff
Fix 0014420: system warning in make_captcha

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
Affected Issues
0014420
mod - make_captcha_img.php Diff File

MantisBT: master 15251868

2012-06-25 23:42

dregad


Details Diff
Fix 0014420: system warning in make_captcha

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
Affected Issues
0014420
mod - make_captcha_img.php Diff File