From bf170f043b890c6f149f44496a6a1c87c638ef0e Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Tue, 21 Jan 2014 18:32:06 +0000 Subject: [PATCH] edit.php: - add error message if $handler->init() fails without error message (indicates a bug in $handler->init()) git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1630 a1433add-5e2c-0410-b055-b7f2511e0802 --- edit.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edit.php b/edit.php index 0fb9503e..34918d50 100644 --- a/edit.php +++ b/edit.php @@ -47,6 +47,10 @@ authentication_require_role($formconf['required_role']); if ($edit != '' || $formconf['early_init']) { if (!$handler->init($edit)) { + if (count($handler->errormsg) == 0) { + # should never happen and indicates a bug in $handler->init() + flash_error($handlerclass . "->init() failed, but didn't set any error message"); + } flash_error($handler->errormsg); header ("Location: " . $formconf['listview']); exit;