We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 024dc93 commit e27edfbCopy full SHA for e27edfb
tests/JsonSchema/Tests/ValidatorTestCase.php
@@ -133,13 +133,17 @@ protected function decodeJsonFromFile($file)
133
134
private function dump($variable)
135
{
136
- $options = JSON_PRETTY_PRINT;
+ if (defined('JSON_PRETTY_PRINT')) {
137
+ $options = JSON_PRETTY_PRINT;
138
- if (defined('JSON_PRESERVE_ZERO_FRACTION')) {
139
- $options |= JSON_PRESERVE_ZERO_FRACTION;
+ if (defined('JSON_PRESERVE_ZERO_FRACTION')) {
140
+ $options |= JSON_PRESERVE_ZERO_FRACTION;
141
+ }
142
+
143
+ return json_encode($variable, $options);
144
}
145
- return json_encode($variable, $options);
146
+ return print_r($variable, true);
147
148
149
private function assertHasError(array $errors, array $reportParameters)
0 commit comments