Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15469826
D9639.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.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
Sat, Apr 5, 4:56 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7351013
Default Alt Text
D9639.diff (691 B)
Attached To
Mode
D9639: Update callsites of `phutil_json_decode`.
Attached
Detach File
Event Timeline
Log In to Comment