Skip to content

Commit fe07163

Browse files
committed
Fixed str_replace usage for PHP 8 in YamlTests
1 parent 32204c5 commit fe07163

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

util/YamlTests.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ public static function render(string $fileName, array $params = []): string
310310
$value = var_export($value, true);
311311
} elseif ($value instanceof \stdClass) {
312312
$value = 'new \stdClass';
313+
} elseif (is_numeric($value)) {
314+
$value = (string) $value;
313315
}
314316
$output = str_replace($name, $value, $output);
315317
}

0 commit comments

Comments
 (0)