8000 escape function does not always take a string · symfony/symfony@1b17192 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b17192

Browse files
committed
escape function does not always take a string
1 parent 32e1400 commit 1b17192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Workflow/Dumper/GraphvizDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ protected function dotize($id)
204204
/**
205205
* @internal
206206
*/
207-
protected function escape(string $string): string
207+
protected function escape($value): string
208208
{
209-
return addslashes($string);
209+
return \is_bool($value) ? ($value ? '1' : '0') : \addslashes($value);
210210
}
211211

212212
private function addAttributes(array $attributes): string

0 commit comments

Comments
 (0)
0