File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ final class QueryReflection
4242 // see https://github.com/php/php-src/blob/01b3fc03c30c6cb85038250bb5640be3a09c6a32/ext/pdo/pdo_sql_parser.re#L48
4343 private const NAMED_PATTERN = ':[a-zA-Z0-9_]+ ' ;
4444
45- private const REGEX_UNNAMED_PLACEHOLDER = '{([" \'])((?:(?!\1). )*\1)|( ' . self ::UNNAMED_PATTERN . ')} ' ;
45+ private const REGEX_UNNAMED_PLACEHOLDER = '{([" \'])((?:(?!\1)(?s:.) )*\1)|( ' . self ::UNNAMED_PATTERN . ')} ' ;
4646
47- private const REGEX_NAMED_PLACEHOLDER = '{([" \'])((?:(?!\1). )*\1)|( ' . self ::NAMED_PATTERN . ')} ' ;
47+ private const REGEX_NAMED_PLACEHOLDER = '{([" \'])((?:(?!\1)(?s:.) )*\1)|( ' . self ::NAMED_PATTERN . ')} ' ;
4848
4949 /**
5050 * @var QueryReflector|null
Original file line number Diff line number Diff line change @@ -136,4 +136,14 @@ public function supportNestedQuotes(PDO $pdo)
136136 );
137137 $ stmt ->execute (['value ' => 'bar ' ]);
138138 }
139+
140+ public function bug657MultilineString (PDO $ pdo )
141+ {
142+ $ stmt = $ pdo ->prepare (<<<SQL
143+ UPDATE `ada` SET email = "multi
144+ line" WHERE `email`= ? AND `email` = "value";
145+ SQL
146+ );
147+ $ stmt ->execute (['value ' ]);
148+ }
139149}
You can’t perform that action at this time.
0 commit comments