projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #18930 from MegaphoneJon/financial-156
[civicrm-core.git]
/
CRM
/
Utils
/
JSON.php
diff --git
a/CRM/Utils/JSON.php
b/CRM/Utils/JSON.php
index 144c66900220bf3183ac3a7da64bc8c95da98cd3..5f3bcabd85a2e3c275ca917e77d5f413a67d3d73 100644
(file)
--- a/
CRM/Utils/JSON.php
+++ b/
CRM/Utils/JSON.php
@@
-25,6
+25,9
@@
class CRM_Utils_JSON {
* @param mixed $input
*/
public static function output($input) {
* @param mixed $input
*/
public static function output($input) {
+ if (CIVICRM_UF === 'UnitTests') {
+ throw new CRM_Core_Exception_PrematureExitException('civiExit called', $input);
+ }
CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
echo json_encode($input);
CRM_Utils_System::civiExit();
CRM_Utils_System::setHttpHeader('Content-Type', 'application/json');
echo json_encode($input);
CRM_Utils_System::civiExit();