Skip to content

Commit b1e882e

Browse files
committed
Fix str_replace() newline replacement
Fixes e333fc0
1 parent 2aa5329 commit b1e882e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/utils/tools.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ function throws($function, $exceptionname, $infunction = null) {
243243
if (strcasecmp($function, $infunction) == 0) {
244244
printf("OK: Got %s thrown from %s\n", $exceptionname, $infunction);
245245
} else {
246-
$message = str_replace(array("\n", "\r", ' ', $e->getMessage()));
246+
$message = str_replace(array("\n", "\r"), ' ', $e->getMessage());
247247
printf("ALMOST: Got %s - but was thrown in %s, not %s (%s)\n", $exceptionname, $function, $infunction, $message);
248248
}
249249
return $e->getMessage();
250250
}
251251
printf("OK: Got %s\n", $exceptionname);
252252
} else {
253-
$message = str_replace(array("\n", "\r", ' ', $e->getMessage()));
253+
$message = str_replace(array("\n", "\r"), ' ', $e->getMessage());
254254
printf("ALMOST: Got %s - expected %s: %s\n", get_class($e), $exceptionname, $message);
255255
}
256256
return $e->getMessage();

0 commit comments

Comments
 (0)