Fixes: ban page spamnoticer logic fix, don't call setcookie with null arg

This commit is contained in:
towards-a-new-leftypol 2023-08-31 13:38:04 +00:00
parent 7c43eca49d
commit a6cd12ed9f
2 changed files with 10 additions and 2 deletions

View File

@ -135,7 +135,15 @@ function setCookies() {
function destroyCookies() { function destroyCookies() {
global $config; global $config;
// Delete the cookies // Delete the cookies
setcookie($config['cookies']['mod'], 'deleted', time() - $config['cookies']['expire'], $config['cookies']['jail']?$config['cookies']['path'] : '/', null, !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off', true); setcookie(
$config['cookies']['mod'],
'deleted',
time() - $config['cookies']['expire'],
$config['cookies']['jail']?$config['cookies']['path'] : '/',
"",
!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off',
true
);
} }
function modLog($action, $_board=null) { function modLog($action, $_board=null) {

View File

@ -1833,7 +1833,7 @@ function mod_ban_post(string $board, $delete, $post_num, $token = false) {
$_POST['length'], $_POST['length'],
$_POST['board']); $_POST['board']);
$will_delete = isset($_POST['delete']) && (int) $_POST['delete']; $will_delete = $will_delete && isset($_POST['delete']) && (int) $_POST['delete'];
$has_public_message = isset($_POST['public_message'], $_POST['message']); $has_public_message = isset($_POST['public_message'], $_POST['message']);