From 9b1a9f9a796ed14e09a9cdc98fb9b007f0a68b67 Mon Sep 17 00:00:00 2001 From: Krombel Date: Wed, 28 Feb 2018 23:20:58 +0100 Subject: [PATCH] fix sending error message to room; add \n for cron-output --- cron.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cron.php b/cron.php index 125c487..861137e 100644 --- a/cron.php +++ b/cron.php @@ -76,12 +76,12 @@ foreach ($db->query($sql) as $row) { $mxMsg = new MatrixMessage(); $mxMsg->set_type("m.text"); $mxMsg->set_body("Fehler beim Registrieren von " . $first_name . " " . $last_name . "."); - $mxConn->send($mxMsg); + $mxConn->send($register_room, $mxMsg); throw new Exception($language["REGISTRATION_FAILED"]); } break; case RegisterState::PendingSendRegistrationMail: - print ("Error: Unhandled state: PendingSendRegistrationMail for " . $first_name . " " . $last_name . " (" . $username . ")"); + print ("Error: Unhandled state: PendingSendRegistrationMail for " . $first_name . " " . $last_name . " (" . $username . ")\n"); break; case RegisterState::RegistrationDeclined: case RegisterState::AllDone: @@ -89,7 +89,7 @@ foreach ($db->query($sql) as $row) { break; } } catch (Exception $e) { - print("Error while handling cron for " . $first_name . " " . $last_name . " (" . $username . ")"); + print("Error while handling cron for " . $first_name . " " . $last_name . " (" . $username . ")\n"); print($e->getMessage()); } }