Add temporary error logging and debugging output in index.php and register.php
This commit is contained in:
@@ -15,12 +15,17 @@ class Register extends Renderer {
|
|||||||
protected string $templateName = 'renderer';
|
protected string $templateName = 'renderer';
|
||||||
|
|
||||||
protected function formAction(): void {
|
protected function formAction(): void {
|
||||||
|
error_log('DEBUG Register::formAction aufgerufen');
|
||||||
if (!$this->formCheckFields()) {
|
if (!$this->formCheckFields()) {
|
||||||
|
error_log('DEBUG Register::formCheckFields fehlgeschlagen: ' . print_r($this->errors, true));
|
||||||
// Bei Validierungsfehlern: nichts speichern, keine Mail, Fehler im Formular anzeigen
|
// Bei Validierungsfehlern: nichts speichern, keine Mail, Fehler im Formular anzeigen
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
error_log('DEBUG Register::formCheckFields ok, schreibe in DB');
|
||||||
$this->writeToDb();
|
$this->writeToDb();
|
||||||
|
error_log('DEBUG Register::writeToDb erledigt, sende Mail');
|
||||||
$this->sendEmail();
|
$this->sendEmail();
|
||||||
|
error_log('DEBUG Register::sendEmail beendet, Errors: ' . print_r($this->errors, true));
|
||||||
if (count($this->errors) === 0) {
|
if (count($this->errors) === 0) {
|
||||||
$this->templateName = 'register_successful';
|
$this->templateName = 'register_successful';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
// Temporäre Fehlerausgabe und Logging für Debugzwecke
|
||||||
|
ini_set('display_errors', '0');
|
||||||
|
ini_set('log_errors', '1');
|
||||||
|
ini_set('error_reporting', (string)E_ALL);
|
||||||
|
ini_set('error_log', __DIR__ . '/php-error.log');
|
||||||
|
|
||||||
if (isset($_REQUEST['q']) && substr($_REQUEST['q'], -4) === '.php') {
|
if (isset($_REQUEST['q']) && substr($_REQUEST['q'], -4) === '.php') {
|
||||||
$url = substr($_REQUEST['q'], 0, -4);
|
$url = substr($_REQUEST['q'], 0, -4);
|
||||||
header('Location: ' . $url, true, 301);
|
header('Location: ' . $url, true, 301);
|
||||||
|
|||||||
Reference in New Issue
Block a user