Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 09:39 pm EST
Geeklog Forums
dailyquote add quote error and fix
Status: Banned
machinari
Forum User
Full Member
Registered: 03/22/04
Posts: 1512
an error returned when adding a single quote while the option to allow users the ability to create new categories was turned off. This was reported by r_f_o_t who said :
here is the quick fix--change line 212 in add.php from:
to this:
$a = $_POST['cat'];
} else $a = array(1 => '');
this is just the quick fix. the code will reflect proper checking in the next release. thanks again for the report.
Quote by r_f_o_t:When users add quote, they get a warning message at top of site:
Text Formatted Code
Warning: Invalid argument supplied for foreach() in /home/xxx/xxx/site/dailyquote/add.php on line 214here is the quick fix--change line 212 in add.php from:
Text Formatted Code
$a = $_POST['cat'];to this:
Text Formatted Code
if(is_array($_POST['cat'])){$a = $_POST['cat'];
} else $a = array(1 => '');
this is just the quick fix. the code will reflect proper checking in the next release. thanks again for the report.
6
7
Quote
All times are EST. The time is now 09:39 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content