SMFHacks.com

SMF Gallery Lite => SMF Gallery Lite => Topic started by: Bergler on March 06, 2009, 12:38:47 pm

Title: gallery error
Post by: Bergler on March 06, 2009, 12:38:47 pm
I have this error, any idea how to fix it??

http://www.flytyingbug.com/forums/index.php?action=gallery&sa=add2 
8: Undefined index: cat
File: /nfs/c03/h03/mnt/52866/domains/flytyingbug.com/html/forums/Sources/Gallery2.php
Line: 634 


Quote
621: 
622:    
   
$_REQUEST['description'] = html_to_bbc($_REQUEST['description']);
623: 
624:    
   
// We need to unhtml it now as it gets done shortly.
625:    
   
$_REQUEST['description'] = un_htmlspecialchars($_REQUEST['description']);
626: 
627: 
628:    
}
629: 
630: 
631:    
$title = htmlspecialchars($_REQUEST['title'],ENT_QUOTES);
632:    
$description = htmlspecialchars($_REQUEST['description'],ENT_QUOTES);
633:    
$keywords = htmlspecialchars($_REQUEST['keywords'],ENT_QUOTES);
==>634:    
$cat = (int) $_REQUEST['cat'];  
635:    
@$allowcomments = $_REQUEST['allowcomments'];
636: 
637:    
// Check if pictures are auto approved
638:    
$approved = (allowedTo('smfgallery_autoapprove') ? 1 : 0);
639: 
640:    
// Allow comments on picture if no setting set.
641:    
if(empty($modSettings['gallery_commentchoice']) || $modSettings['gallery_commentchoice'] == 0)
642:    
   
$allowcomments = 1;
643:    
else
644:    
{
645:    
   
if(empty($allowcomments))
646:    
   
   
$allowcomments = 0;
647:    
   
else
648:    
   
   
$allowcomments = 1;
649:    
}
650: 
651:    
if (trim($title) == '')
652:    
   
fatal_error($txt['gallery_error_no_title'],false);
653:    
if (empty($cat))
654:    
   
fatal_error($txt['gallery_error_no_cat'],false);
Title: Re: gallery error
Post by: SMFHacks on March 07, 2009, 12:48:59 am
Will fix it for next update that is just a warning and is safe to ignore.