summaryrefslogtreecommitdiff
path: root/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php')
-rw-r--r--vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
index 68683d0..b9e376e 100644
--- a/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
+++ b/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
@@ -16,7 +16,7 @@ class SyntaxErrorException extends \InvalidArgumentException
array $token,
$expression
) {
- $message = "Syntax error at character {$token['pos']}\n"
+ $message = sprintf("Syntax error at character %d\n", max($token['pos'], 0))
. $expression . "\n" . str_repeat(' ', max($token['pos'], 0)) . "^\n";
$message .= !is_array($expectedTypesOrMessage)
? $expectedTypesOrMessage