escape function does not always take a string

This commit is contained in:
Baptiste Leduc 2019-02-07 13:40:54 +01:00
parent 32e14005a6
commit 1b17192b0a
No known key found for this signature in database
GPG Key ID: 1B84BEAADFA969CB

View File

@ -204,9 +204,9 @@ class GraphvizDumper implements DumperInterface
/**
* @internal
*/
protected function escape(string $string): string
protected function escape($value): string
{
return addslashes($string);
return \is_bool($value) ? ($value ? '1' : '0') : \addslashes($value);
}
private function addAttributes(array $attributes): string