diff --git a/includes/classes/Command.php b/includes/classes/Command.php index 784e8083d2..823cf82849 100644 --- a/includes/classes/Command.php +++ b/includes/classes/Command.php @@ -1516,7 +1516,7 @@ protected function print_json_response( $response, $pretty ) { * @param boolean $pretty_print_flag Whether it should or not be formatted. */ protected function pretty_json_encode( $json_obj, $pretty_print_flag ) { - $flag = $pretty_print_flag ? JSON_PRETTY_PRINT : null; + $flag = $pretty_print_flag ? JSON_PRETTY_PRINT : 0; WP_CLI::line( wp_json_encode( $json_obj, $flag ) ); }