Minor improvements (#1308)

* Minor improvements

* Updated
This commit is contained in:
Roman Kelesidis 2024-01-06 12:59:26 +07:00 committed by GitHub
commit f48e7121df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View file

@ -517,7 +517,11 @@ if ($mode) {
case 'movedelcat':
// Move or delete a category in the DB
$from_id = (int)$_POST['from_id'];
$to_id = (int)$_POST['to_id'];
$to_id = (int)$_POST['to_id'] ?? -1;
if ($to_id === -1) {
bb_die($lang['NOWHERE_TO_MOVE']);
}
if ($from_id == $to_id || !cat_exists($from_id) || !cat_exists($to_id)) {
bb_die('Bad input');