If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Expecting Picture File  XML
Forum Index » Support Forum
Author Message
Anonymous




I just found out today from a friend trying to add a guestbook entry that it's not working.

Turns out that if the user does not specify a picture file, they will get an error 'Warning: getimagesize: Unable to open '' for reading.'

If the user does specify a picture file then all is ok.

For the life of me I can not figure out why Guestbook is failing when NO picture file is specified.

Please help

Thomas
Anonymous



I wanted to add that the following line in lib/add.class.php is what I feel is failing incorrectly:

if (is_array($this->userfile) && $this->userfile["userfile"]["tmp_name"] != "none") {

I do not think that it should fall into this if there is no picture file specified (right ?).

Thomas
Anonymous



Doing some searching I found that the solution was:

fix for addentry.php:

$gb_post->userfile = (isset($HTTP_POST_FILES["userfile"]["tmp_name"]) && $HTTP_POST_FILES["userfile"]["tmp_name"] != "") ? $HTTP_POST_FILES : '';

Regards,

Thomas
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum