Skip to content

Commit 9ccf6e7

Browse files
committed
Fix quotes in exception messages
1 parent 95f483b commit 9ccf6e7

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)
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
@@ -58,7 +58,7 @@ public function translateNthChild(XPathExpr $xpath, FunctionNode $function, $las
5858
try {
5959
list($a, $b) = Parser::parseSeries($function->getArguments());
6060
} catch (SyntaxErrorException $e) {
61-
throw new ExpressionErrorException(sprintf('Invalid series: %s.', implode(', ', $function->getArguments())), 0, $e);
61+
throw new ExpressionErrorException(sprintf('Invalid series: "%s".', implode('", "', $function->getArguments())), 0, $e);
6262
}
6363

6464
$xpath->addStarPrefix();

0 commit comments

Comments
 (0)