Changeset View
Changeset View
Standalone View
Standalone View
externals/jsonlint/src/Seld/JsonLint/JsonParser.php
Show First 20 Lines • Show All 475 Lines • ▼ Show 20 Lines | private function lex() | ||||
return $token; | return $token; | ||||
} | } | ||||
private function failOnBOM($input) | private function failOnBOM($input) | ||||
{ | { | ||||
// UTF-8 ByteOrderMark sequence | // UTF-8 ByteOrderMark sequence | ||||
$bom = "\xEF\xBB\xBF"; | $bom = "\xEF\xBB\xBF"; | ||||
if (substr($input, 0, 3) === $bom) { | if ($input && substr($input, 0, 3) === $bom) { | ||||
valerio.bozzolan: ✅ Verified: this involves a PHP pitfall (string with zero) that is OK here, since this tries to… | |||||
valerio.bozzolanUnsubmitted Not Done Inline ActionsNOTE: Already fixed in D25250 valerio.bozzolan: NOTE: Already fixed in D25250 | |||||
$this->parseError("BOM detected, make sure your input does not include a Unicode Byte-Order-Mark", array()); | $this->parseError("BOM detected, make sure your input does not include a Unicode Byte-Order-Mark", array()); | ||||
} | } | ||||
} | } | ||||
} | } | ||||
No newline at end of file |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ Verified: this involves a PHP pitfall (string with zero) that is OK here, since this tries to match a ByteOrderMark.