[Filesystem] Fix error message

This commit is contained in:
Robin Chalas 2019-07-22 02:58:17 +02:00
parent cade80889b
commit 3ba3ae9bc3

View File

@ -638,7 +638,7 @@ class Filesystem
public function dumpFile(string $filename, $content) public function dumpFile(string $filename, $content)
{ {
if (\is_array($content)) { if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to %s() must be string or resource, %s given.', __METHOD__, $content)); throw new \TypeError(sprintf('Argument 2 passed to %s() must be string or resource, array given.', __METHOD__));
} }
$dir = \dirname($filename); $dir = \dirname($filename);
@ -674,7 +674,7 @@ class Filesystem
public function appendToFile(string $filename, $content) public function appendToFile(string $filename, $content)
{ {
if (\is_array($content)) { if (\is_array($content)) {
throw new \TypeError(sprintf('Argument 2 passed to %s() must be string or resource, %s given.', __METHOD__, $content)); throw new \TypeError(sprintf('Argument 2 passed to %s() must be string or resource, array given.', __METHOD__));
} }
$dir = \dirname($filename); $dir = \dirname($filename);