Skip to content

Commit

Permalink
Fix warning for continue in PHP 7.3
Browse files Browse the repository at this point in the history
Warning: "continue" targeting switch is equivalent to "break". Did you
mean to use "continue 2"? in ...\include\functions.php on line 1823
  • Loading branch information
MioVisman committed Nov 17, 2019
1 parent 134c032 commit 07fed4d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ function forum_session_start() {
$forum_session_id = random_key(32, FALSE, TRUE);
session_id($forum_session_id);
}

if (!isset($_SESSION))
{
session_start();
}

if (!isset($_SESSION['initiated']))
{
session_regenerate_id();
Expand Down Expand Up @@ -1820,7 +1820,7 @@ function get_tracked_topics()
{
case 'f': $type = 'forums'; break;
case 't': $type = 'topics'; break;
default: continue;
default: continue 2;
}

$id = intval(substr($id_data, 1));
Expand Down Expand Up @@ -2977,10 +2977,10 @@ function _csrf_confirm_form($key, $values)
}

($hook = get_hook('fn_redirect_pre_send_json')) ? eval($hook) : null;

send_json($json_data);
}
}

// Setup breadcrumbs
$forum_page['crumbs'] = array(
array($forum_config['o_board_title'], forum_link($forum_url['index'])),
Expand Down Expand Up @@ -3049,7 +3049,7 @@ function message($message, $link = '', $heading = '')
global $forum_db, $forum_url, $lang_common, $forum_config, $base_url, $forum_start, $tpl_main, $forum_user, $forum_page, $forum_updates, $forum_loader, $forum_flash;

($hook = get_hook('fn_message_start')) ? eval($hook) : null;

if (defined('FORUM_REQUEST_AJAX'))
{
$json_data = array(
Expand All @@ -3058,7 +3058,7 @@ function message($message, $link = '', $heading = '')
);

($hook = get_hook('fn_message_pre_send_json')) ? eval($hook) : null;

send_json($json_data);
}

Expand Down Expand Up @@ -3228,12 +3228,12 @@ function redirect($destination_url, $message)
'message' => $message,
'destination_url' => $destination_url
);

($hook = get_hook('fn_redirect_pre_send_json')) ? eval($hook) : null;

send_json($json_data);
}
}

// If the delay is 0 seconds, we might as well skip the redirect all together
if ($forum_config['o_redirect_delay'] == '0') {
if (!$forum_flash->get_message()) {
Expand Down

0 comments on commit 07fed4d

Please sign in to comment.