handle_post: set $debug after opening board

- so it doesn't overwrite the global debug variable.
- global variables are dumb.
This commit is contained in:
towards-a-new-leftypol 2024-12-31 07:07:36 -05:00
parent 8ebe1aa560
commit 7cfe5cc0e3
1 changed files with 2 additions and 1 deletions

View File

@ -458,7 +458,6 @@ function handle_post(){
global $config, $dropped_post, $board, $mod, $pdo, $debug;
$time_1 = microtime(true);
$debug['time']['post'] = array();
init_global_post_cleanup();
@ -472,6 +471,8 @@ function handle_post(){
if (!openBoard($post['board']))
error($config['error']['noboard']);
$debug['time']['post'] = array();
$board_locked_check = (!isset($_POST['mod']) || !$_POST['mod'])
&& ($config['board_locked']===true
|| (is_array($config['board_locked']) && in_array(strtolower($_POST['board']), $config['board_locked'])));