summaryrefslogtreecommitdiff
path: root/vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2023-10-20 16:44:35 +0300
committerAndrew Dolgov <[email protected]>2023-10-20 16:44:35 +0300
commit8bec661288b276c98bdb0e773e5f4d5275dc4c87 (patch)
tree8617ebe581c62fc46a7881aa61801ebce9d3c603 /vendor/mtdowling/jmespath.php/src/SyntaxErrorException.php
parent540438c2eb5452bacad30c247906bfa287f2da1d (diff)
update AWK SDKHEADmaster
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