Don't translate errors

This commit is contained in:
Rob McVey 2015-03-14 08:34:06 +00:00
parent 3b01c5f842
commit 842cdf58f8

View file

@ -158,11 +158,11 @@ class JsonView extends View {
if (function_exists('json_last_error_msg')) {
$error = json_last_error_msg();
} else {
$error = __('JSON encoding failed: Error code %s', json_last_error());
$error = sprintf('JSON encoding failed: Error code %s', json_last_error());
}
throw new CakeException($error);
} elseif ($json === false) {
throw new CakeException(__('Failed to parse JSON'));
throw new CakeException('Failed to parse JSON');
}
return $json;
}