diff options
author | Urban Müller | 2020-04-15 13:53:34 +0200 |
---|---|---|
committer | Urban Müller | 2020-04-15 13:53:34 +0200 |
commit | df4b93a72b688cbf0487558d4f67a9d8aaa754d2 (patch) | |
tree | 727eeae0e79e313fd2acd05f5aee73162a51759e | |
parent | 12f609e72c1dc851cfce8b4e973e9684b95595ef (diff) | |
download | itools-df4b93a72b688cbf0487558d4f67a9d8aaa754d2.tar.gz itools-df4b93a72b688cbf0487558d4f67a9d8aaa754d2.tar.bz2 itools-df4b93a72b688cbf0487558d4f67a9d8aaa754d2.zip |
allow disabling pretty printing
-rw-r--r-- | it.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1158,11 +1158,11 @@ static function pipe($cmd, $args = array()) /** * Encodes data to json with unescaped slahes, unescape unicode and on devel pretty printing - * @param $p['pretty'] Pretty-print json + * @param $p['pretty'] Force enable or disable pretty printing */ static function json_encode($data, $p = []) { - return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | ($p['pretty'] || it::is_devel() ? JSON_PRETTY_PRINT : 0)); + return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | ($p['pretty'] ?? it::is_devel() ? JSON_PRETTY_PRINT : 0)); } /** |