[SOLVED] [PATCH] Captcha not showing image when submitting comments

Cry Regarder

Joined: 2010-12-07
Posts: 9
Posted: Mon, 2012-11-26 16:50

I recently update my gallery2 server after several years. Along the way I ran into several issues. One of which was that captcha was no longer working to display the image when submitting comments. This has to be a very common issue people are facing even though I'm not seeing it in the forums as the code is broken on new systems. In particular, the arguments to ImageJPEG in modules/captcha/CaptchaImage.inc are wrong:


--- CaptchaImage.inc.orig    2012-11-25 16:12:02.838684229 -0800
+++ CaptchaImage.inc    2012-11-25 16:12:08.733601285 -0800
@@ -88,7 +88,7 @@
 
     /* Output the image and reclaim the memory it used */
     /* Use low quality jpeg compression to make the image less OCR-able */
-    ImageJPEG($image, '', 50);
+    ImageJPEG($image, NULL, 50);
     ImageDestroy($image);
 
     return null;

I hope this helps someone! By the way, I also filed this as a bug in fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=880006

Cry.


Gallery version (not just "2"): 2.3.2
PHP version (e.g. 5.1.6):5.4.9
Webserver (e.g. Apache 1.3.33): Apache 2.2.22
Database (e.g. MySql 5.0.32): 5.5.28
Operating system (e.g. Linux): Fedora 17

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2012-11-26 17:05

Thanks for the report and fix.
--
dakanji.com

 
Dayo

Joined: 2005-11-04
Posts: 1642
Posted: Mon, 2012-11-26 17:06

Comments are now locked for this topic.