Merge pull request #22674 from emilisev/fix_warning

FIX Undefined variable $backtopage
This commit is contained in:
Laurent Destailleur 2022-10-25 14:39:41 +02:00 committed by GitHub
commit e9c1bc8597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -145,6 +145,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) {
$sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'"; $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."adherent_type WHERE libelle='".$db->escape($object->label)."'";
$sql .= " WHERE entity IN (".getEntity('member_type').")"; $sql .= " WHERE entity IN (".getEntity('member_type').")";
$result = $db->query($sql); $result = $db->query($sql);
$num = null;
if ($result) { if ($result) {
$num = $db->num_rows($result); $num = $db->num_rows($result);
} }

View File

@ -160,7 +160,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes' && !empty($permissionto
} }
if (is_object($object) && $object->id > 0) { if (is_object($object) && $object->id > 0) {
if ($backtopage) { if (!empty($backtopage)) {
header('Location: '.$backtopage); header('Location: '.$backtopage);
exit; exit;
} else { } else {