Jump to content

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


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...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.