Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2905426
D25269.1737345563.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25269.1737345563.diff
View Options
diff --git a/externals/jsonlint/src/Seld/JsonLint/JsonParser.php b/externals/jsonlint/src/Seld/JsonLint/JsonParser.php
--- a/externals/jsonlint/src/Seld/JsonLint/JsonParser.php
+++ b/externals/jsonlint/src/Seld/JsonLint/JsonParser.php
@@ -481,8 +481,8 @@
// UTF-8 ByteOrderMark sequence
$bom = "\xEF\xBB\xBF";
- if (substr($input, 0, 3) === $bom) {
+ if ($input && substr($input, 0, 3) === $bom) {
$this->parseError("BOM detected, make sure your input does not include a Unicode Byte-Order-Mark", array());
}
}
-}
\ No newline at end of file
+}
diff --git a/externals/jsonlint/src/Seld/JsonLint/Lexer.php b/externals/jsonlint/src/Seld/JsonLint/Lexer.php
--- a/externals/jsonlint/src/Seld/JsonLint/Lexer.php
+++ b/externals/jsonlint/src/Seld/JsonLint/Lexer.php
@@ -94,7 +94,7 @@
public function getUpcomingInput()
{
$next = $this->match;
- if (strlen($next) < 20) {
+ if ($this->input && strlen($next) < 20) {
$next .= substr($this->input, 0, 20 - strlen($next));
}
@@ -129,7 +129,7 @@
$rulesLen = count($rules);
for ($i=0; $i < $rulesLen; $i++) {
- if (preg_match($this->rules[$rules[$i]], $this->input, $match)) {
+ if ($this->input && $match && preg_match($this->rules[$rules[$i]], $this->input, $match)) {
preg_match_all('/\n.*/', $match[0], $lines);
$lines = $lines[0];
if ($lines) {
@@ -212,4 +212,4 @@
return 'INVALID';
}
}
-}
\ No newline at end of file
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 03:59 (1 w, 1 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129863
Default Alt Text
D25269.1737345563.diff (1 KB)
Attached To
Mode
D25269: Fix PHP 8.2 "strlen(null)" exceptions block rendering Differential Revision page (T15432 - 2/2)
Attached
Detach File
Event Timeline
Log In to Comment