merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit f8240b386da14cd28318a28be96436fd9a3b7827
parent d956c39945c280d75407429158e088cc6b050f5b
Author: Florian Dold <dold@inria.fr>
Date:   Sun, 20 Dec 2015 01:24:54 +0100

Add error handler.

Otherwise, the javascript thinks that the PHP error
is the contract.

Diffstat:
Msrc/frontend/generate_taler_contract.php | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/frontend/generate_taler_contract.php b/src/frontend/generate_taler_contract.php @@ -30,7 +30,18 @@ if the whole "journey" to the backend is begin tested - $ curl http://merchant_url/generate_taler_contract.php?backend_test=no if just the frontend job is being tested -*/ + */ + + +register_shutdown_function(function() { + $lastError = error_get_last(); + + if (!empty($lastError) && $lastError['type'] == E_ERROR) { + header('Status: 500 Internal Server Error'); + header('HTTP/1.0 500 Internal Server Error'); + } +}); + $cli_debug = false; $backend_test = true;