Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15410631
D9004.id21393.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
D9004.id21393.diff
View Options
diff --git a/src/auth/PhutilAuthAdapterOAuthWordPress.php b/src/auth/PhutilAuthAdapterOAuthWordPress.php
--- a/src/auth/PhutilAuthAdapterOAuthWordPress.php
+++ b/src/auth/PhutilAuthAdapterOAuthWordPress.php
@@ -51,8 +51,8 @@
public function getExtraAuthenticateParameters() {
return array(
- 'response_type' => 'code',
- 'blog_id' => 0,
+ 'response_type' => 'code',
+ 'blog_id' => 0,
);
}
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
@@ -1,8 +1,5 @@
<?php
-/**
- * @group wordpress
- */
final class PhutilWordPressFuture extends FutureProxy {
private $future;
@@ -72,15 +69,16 @@
throw $status;
}
- $data = json_decode($body, true);
- if (!is_array($data)) {
- throw new Exception("Expected JSON response from WordPress.com, ".
- "got: {$body}");
+ $data = phutil_json_decode($body);
+ if (empty($data)) {
+ throw new Exception(
+ pht('Expected JSON response from WordPress.com, got: %s', $body));
}
if (idx($data, 'error')) {
$error = $data['error'];
- throw new Exception("Received error from WordPress.com: {$error}");
+ throw new Exception(
+ pht('Received error from WordPress.com: %s', $error));
}
return $data;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 7:57 AM (8 h, 14 m ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7675100
Default Alt Text
D9004.id21393.diff (1 KB)
Attached To
Mode
D9004: Add WordPress.com OAuth2 plugin
Attached
Detach File
Event Timeline
Log In to Comment