HomePhabricator

onBlockIpComplete: Check that $blockTarget is an object
dc4c97e3fd98Unpublished

Authored by mobrovac on Mar 21 2019, 9:35 PM.

Unpublished Commit · Learn More

Publishing Disabled: All publishing is disabled for this repository.

Description

onBlockIpComplete: Check that $blockTarget is an object

The block target can be a User object, a user_id or an IP. When the
target is a User object, we have to get their user_id, so we have to
check for that. However, get_class() works only on objects and emits a
warning otherwise, so swap it for instanceof.

Bug: T218952
Change-Id: I6824ac211d3bcd4246372af3ce0175f2af79561d

Details