Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15348434
D21865.id52122.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D21865.id52122.diff
View Options
diff --git a/src/future/http/status/HTTPFutureHTTPResponseStatus.php b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
--- a/src/future/http/status/HTTPFutureHTTPResponseStatus.php
+++ b/src/future/http/status/HTTPFutureHTTPResponseStatus.php
@@ -21,7 +21,8 @@
$content_type = BaseHTTPFuture::getHeader($headers, 'Content-Type');
$match = null;
- if (preg_match('/;\s*charset=([^;]+)/', $content_type, $match)) {
+ if ($content_type !== null && strlen($content_type)
+ && preg_match('/;\s*charset=([^;]+)/', $content_type, $match)) {
$encoding = trim($match[1], "\"'");
try {
$excerpt = phutil_utf8_convert($excerpt, 'UTF-8', $encoding);
diff --git a/src/parser/ArcanistDiffParser.php b/src/parser/ArcanistDiffParser.php
--- a/src/parser/ArcanistDiffParser.php
+++ b/src/parser/ArcanistDiffParser.php
@@ -263,7 +263,7 @@
// searching for "diff -r" or "diff --git" in the text.
$this->saveLine();
$line = $this->nextLineThatLooksLikeDiffStart();
- if (!$this->tryMatchHeader($patterns, $line, $match)) {
+ if ($line === null || !$this->tryMatchHeader($patterns, $line, $match)) {
// Restore line before guessing to display correct error.
$this->restoreLine();
$failed_parse = true;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 11, 2:30 PM (2 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7530706
Default Alt Text
D21865.id52122.diff (1 KB)
Attached To
Mode
D21865: Updates for PHP 8.2 compatibility - Arcanist
Attached
Detach File
Event Timeline
Log In to Comment