summaryrefslogtreecommitdiff
path: root/actions/twitapiblocks.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/twitapiblocks.php')
-rw-r--r--actions/twitapiblocks.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/actions/twitapiblocks.php b/actions/twitapiblocks.php
index 8135adef3..0e3509162 100644
--- a/actions/twitapiblocks.php
+++ b/actions/twitapiblocks.php
@@ -17,7 +17,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('LACONICA')) {
+ exit(1);
+}
require_once(INSTALLDIR.'/lib/twitterapi.php');
@@ -31,12 +33,12 @@ class TwitapiblocksAction extends TwitterapiAction
$blockee = $this->get_user($apidata['api_arg'], $apidata);
- if (!$blockee) {
+ if (empty($blockee)) {
$this->clientError('Not Found', 404, $apidata['content-type']);
return;
}
- $user = $apidata['user'];
+ $user = $apidata['user']; // Always the auth user
if ($user->hasBlocked($blockee) || $user->block($blockee)) {
$type = $apidata['content-type'];
@@ -53,7 +55,7 @@ class TwitapiblocksAction extends TwitterapiAction
parent::handle($args);
$blockee = $this->get_user($apidata['api_arg'], $apidata);
- if (!$blockee) {
+ if (empty($blockee)) {
$this->clientError('Not Found', 404, $apidata['content-type']);
return;
}