Jump to content

[SOLVED] Fatal error: Cannot break/continue 1 level.....


iamz3r0

Recommended Posts

I recieve this:

Fatal error: Cannot break/continue 1 level in /home/westwind/public_html/phpbb3/includes/functions_posting.php on line 1789

 

The code around line 1789 is:

 

				// Start Ultimate Points
			$sql = 'SELECT points_received, poster_id
				FROM ' . POSTS_TABLE . '
				WHERE post_id = ' . $data['post_id'];
			$result = $db->sql_query_limit($sql, 1);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			if ( $config['points_enable'] && $user->data['user_id'] == $row['poster_id'] )
			{
				$sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points - " . $row['points_received'] . " WHERE user_id = '" . $row['poster_id'] . "'";
				$db->sql_query($sql);

				$sql = "UPDATE " . POSTS_TABLE . " SET points_received = points_received - " . $row['points_received'] . " WHERE post_id = '" . $data['post_id'] . "'";
				$db->sql_query($sql);

				$ultimate_points->new_post_ch($data['forum_id'], $data['post_id'], $ultimate_points->strip_text($data['message']));
			}
			// End Ultimate Points
			$sql_data[postS_TABLE]['sql']['post_text'] = $data['message'];
		}

	break;
}

$post_approved = $sql_data[postS_TABLE]['sql']['post_approved'];
$topic_row = array();

ahh I just had this error! but for a much different reason. You don't seem to have any statement that the break would be in. you have multiple closing brackets in the posted code, but only one opening bracket. post the code thats above what you posted

Okay, I removed the extra bracket and the break. The code looks like:

 

				// Start Ultimate Points
			$sql = 'SELECT points_received, poster_id
				FROM ' . POSTS_TABLE . '
				WHERE post_id = ' . $data['post_id'];
			$result = $db->sql_query_limit($sql, 1);
			$row = $db->sql_fetchrow($result);
			$db->sql_freeresult($result);

			if ( $config['points_enable'] && $user->data['user_id'] == $row['poster_id'] )
			{
				$sql = "UPDATE " . USERS_TABLE . " SET user_points = user_points - " . $row['points_received'] . " WHERE user_id = '" . $row['poster_id'] . "'";
				$db->sql_query($sql);

				$sql = "UPDATE " . POSTS_TABLE . " SET points_received = points_received - " . $row['points_received'] . " WHERE post_id = '" . $data['post_id'] . "'";
				$db->sql_query($sql);

				$ultimate_points->new_post_ch($data['forum_id'], $data['post_id'], $ultimate_points->strip_text($data['message']));
			}
			// End Ultimate Points
			$sql_data[postS_TABLE]['sql']['post_text'] = $data['message'];
		}



$post_approved = $sql_data[postS_TABLE]['sql']['post_approved'];
$topic_row = array();

 

But now I get:

Parse error: syntax error, unexpected $end in /home/westwind/public_html/phpbb3/includes/functions_posting.php on line 2661

 

  • 3 years later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.