Don't create default object from empty value in AbuseFilterHooks

We shouldn't try to set the attribute of a variable which isn't
actually an object as this will lead to the "Creating default
object from empty value" PHP error and it will trigger a further
fatal down the road. This gets triggered in Wikibase and probably
other extension unit tests.

Change-Id: I0f2e93657e5cfdb84ee351be371d421c11291b82