From 8ca0186409f9f5da3aaf192f7bf13f4127c1c0bc Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 15 May 2020 12:46:16 +0000 Subject: [PATCH] Added last DB error --- mod/item.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod/item.php b/mod/item.php index 30d9f03e6..85883914f 100644 --- a/mod/item.php +++ b/mod/item.php @@ -720,8 +720,7 @@ function item_post(App $a) { if ($return_path) { DI::baseUrl()->redirect($return_path); } - - throw new HTTPException\InternalServerErrorException(DI::l10n()->t('Item wasn\'t stored.')); + throw new HTTPException\InternalServerErrorException(DI::l10n()->t('Item wasn\'t stored. Last database error: %d %s', DBA::errorNo(), dba::errorMessage())); } $datarray = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);