minor #32650 [Filesystem] Fix error message (chalasr)

This PR was merged into the 5.0-dev branch.

Discussion
----------

[Filesystem] Fix error message

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Commits
-------

3ba3ae9bc3 [Filesystem] Fix error message
This commit is contained in:
Fabien Potencier 2019-07-22 11:15:33 +02:00
commit 34fff113fa

View File

@ -638,7 +638,7 @@ class Filesystem
public function dumpFile(string $filename, $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);
@ -674,7 +674,7 @@ class Filesystem
public function appendToFile(string $filename, $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);