From f059b33390a00170fc240c93398f5f10cd0d6e1c Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 26 Nov 2017 13:58:24 +0000 Subject: [PATCH] Avoid empty user export when there are UTF8 problems --- mod/uexport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/uexport.php b/mod/uexport.php index 2ada9bc289..5a897f4abe 100644 --- a/mod/uexport.php +++ b/mod/uexport.php @@ -126,7 +126,7 @@ function uexport_account($a) { ); //echo "
"; var_dump(json_encode($output)); killme();
-	echo json_encode($output);
+	echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR);
 }
 
 /**
@@ -154,6 +154,6 @@ function uexport_all(App $a) {
 		);
 
 		$output = array('item' => $r);
-		echo json_encode($output) . "\n";
+		echo json_encode($output, JSON_PARTIAL_OUTPUT_ON_ERROR). "\n";
 	}
 }