Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18106725
D9639.id23134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
691 B
Referenced Files
None
Subscribers
None
D9639.id23134.diff
View Options
diff --git a/src/future/wordpress/PhutilWordPressFuture.php b/src/future/wordpress/PhutilWordPressFuture.php
--- a/src/future/wordpress/PhutilWordPressFuture.php
+++ b/src/future/wordpress/PhutilWordPressFuture.php
@@ -69,10 +69,12 @@
throw $status;
}
- $data = phutil_json_decode($body);
- if (empty($data)) {
- throw new Exception(
- pht('Expected JSON response from WordPress.com, got: %s', $body));
+ try {
+ $data = phutil_json_decode($body);
+ } catch (PhutilJSONParserException $ex) {
+ throw new PhutilProxyException(
+ pht('Expected JSON response from WordPress.com.'),
+ $ex);
}
if (idx($data, 'error')) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 11, 11:13 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8575306
Default Alt Text
D9639.id23134.diff (691 B)
Attached To
Mode
D9639: Update callsites of `phutil_json_decode`.
Attached
Detach File
Event Timeline
Log In to Comment