Skip to content

Commit 402251c

Browse files
committed
Merge branch '3.4' into 4.4
* 3.4: Fix quotes in exception messages
2 parents 8f6f95b + 9ccf6e7 commit 402251c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Parser/Handler/StringHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function handle(Reader $reader, TokenStream $stream): bool
5555
$match = $reader->findPattern($this->patterns->getQuotedStringPattern($quote));
5656

5757
if (!$match) {
58-
throw new InternalErrorException(sprintf('Should have found at least an empty match at %s.', $reader->getPosition()));
58+
throw new InternalErrorException(sprintf('Should have found at least an empty match at %d.', $reader->getPosition()));
5959
}
6060

6161
// check unclosed strings

XPath/Extension/FunctionExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, bool
5353
try {
5454
list($a, $b) = Parser::parseSeries($function->getArguments());
5555
} catch (SyntaxErrorException $e) {
56-
throw new ExpressionErrorException(sprintf('Invalid series: %s.', implode(', ', $function->getArguments())), 0, $e);
56+
throw new ExpressionErrorException(sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e);
5757
}
5858

5959
$xpath->addStarPrefix();

0 commit comments

Comments
 (0)