From 18f7edef98c36dd2cbfd153e87769d203e17a685 Mon Sep 17 00:00:00 2001 From: Markus Fischer Date: Sat, 16 Dec 2017 22:29:15 +0100 Subject: [PATCH] Fix postgres blueprint compileComment to proper escape its content --- src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index 22f33c90dad9..3c8637d42e9c 100755 --- a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -342,7 +342,7 @@ public function compileComment(Blueprint $blueprint, Fluent $command) return sprintf('comment on column %s.%s is %s', $this->wrapTable($blueprint), $this->wrap($command->column->name), - "'".addslashes($command->value)."'" + "'".str_replace("'", "''", $command->value)."'" ); }