From 96755fb0158a2cf4caa5011c87b8e3260cf4b70f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Pij=C3=A1k?= Date: Thu, 2 Jul 2020 12:47:35 +0200 Subject: [PATCH] Update bulkgate-module-tester.php --- bulkgate-module-tester.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bulkgate-module-tester.php b/bulkgate-module-tester.php index 6498a3f..9b3195e 100644 --- a/bulkgate-module-tester.php +++ b/bulkgate-module-tester.php @@ -20,7 +20,14 @@ function same($excepted, $actual, $description, $optional = false) } else { - return ($optional ? ("OPTIONAL") : ("FAIL")) . " $description - '$excepted' must be same as '$actual'
"; + $error = error_get_last(); $error_message = ''; + + if ($error !== null) + { + $error_message = $error['message']; + } + + return ($optional ? ("OPTIONAL") : ("FAIL")) . " $description - Required: '$excepted' must be same as Actual: '$actual'
ERROR: $error_message
"; } } ?> @@ -91,6 +98,7 @@ function same($excepted, $actual, $description, $optional = false) +