echo $util->getFooter();
}
- function handleRequest($request, $ids) {
+ function handleRequest($util, $request, $ids) {
global $CFG;
$query = array();
$mail_id = urldecode($id);
$mail = unserialize($_SESSION['mailInfo']["$mail_id"]);
- if (true == $util->authorized($mail->recipient)) {
+ if (is_object($mail) && true == $util->authorized($mail->recipient)) {
$secret_id = $mail->secret_id;
$recipient = $mail->recipient;
$request = isset($_GET['op']) ? $_GET['op'] : '';
if ($loggedIn && isset($_GET['id'])) {
$ids = explode(',', $_GET['id']);
- $query = handleRequest($request, $ids);
+ $query = handleRequest($util, $request, $ids);
$success = $DB->update($query);
if (! $success) {
error("Message not released, contact administrator [$query]");
$error = array();
foreach ($marked as $mail_id) {
$mail = $DB->getMail($mail_id);
- if (true == $util->authorized($mail->recipient)) {
+ if (is_object($mail) && true == $util->authorized($mail->recipient)) {
$query[] = "delete from msgs where mail_id = '$mail_id'";
$query[] = "delete from msgrcpt where mail_id = '$mail_id'";
$query[] = "delete from quarantine where mail_id = '$mail_id'";