Project

General

Profile

« Previous | Next » 

Revision 286

Added by stefan almost 19 years ago

Added an exit call after every heading("Location:...") redirector to prevent unwanted execution of code.

View differences:

comment.php
30 30
if(!isset($_GET['id']) OR !is_numeric($_GET['id'])) {
31 31
	if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
32 32
		header('Location: '.WB_URL.'/pages/');
33
		exit(0);
33 34
	} else {
34 35
		$post_id = $_POST['post_id'];
35 36
	}
......
45 46
$query_post = $database->query("SELECT post_id,title,section_id,page_id FROM ".TABLE_PREFIX."mod_news_posts WHERE post_id = '$post_id'");
46 47
if($query_post->numRows() == 0) {
47 48
	header('Location: '.WB_URL.'/pages/');
49
	exit(0);
48 50
} else {
49 51
	$fetch_post = $query_post->fetchRow();
50 52
	$page_id = $fetch_post['page_id'];
......
58 60
	$query_page = $database->query("SELECT parent,page_title,menu_title,keywords,description,visibility FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
59 61
	if($query_page->numRows() == 0) {
60 62
		header('Location: '.WB_URL.'/pages/');
63
		exit(0);
61 64
	} else {
62 65
		$page = $query_page->fetchRow();
63 66
		// Required page details

Also available in: Unified diff