Fix for failure/exception on subscription/subscriber lists when deleted profiles are stuck in cached list.
Fix for failure/exception on subscription/subscriber lists when deleted profiles are stuck in cached list.

Workaround for deleted profiles still appearing in cached subscriptions/subscribers lists: if we couldn't fetch them, don't include them in the ArrayWrapper.
ArrayWrapper doesn't deal well with null entries, which aren't meant to happen in how it works. This code has recently changed from dying directly with a PHP fatal error in that case to throwing an exception, which allows tracking down the caller.

It looks like there might be some cases where profiles and their matching subscriptions get deleted, but the subscription entries don't get properly cleared from cache... that still bears further investigation. The regular code path looks ok; calls Subscription::cancel() from code called in Profile::delete(); but if they're batch-deleted instead of one row at a time, that could fail to trigger.

charnimda/lgbtpzn-social,chimo/social,bankonme/gnu-social,charlycoste/StatusNet,foocorp/gnu-social,gnusocial/mainline,faulteh/gnu-social,zh/statusnet,csarven/statusnet,gnusocial/mainline,Piratas/tortuga,minmb/statusnet,zcopley/zcopleys-statusnet-clone,sikevux/bsk-social,UngPirat/freesocial,Piratas/tortuga,sikevux/bsk-social,bankonme/gnu-social,charnimda/lgbtpzn-social,d3vgru/StatusNet,chimo/social,studio666/gnu-social,Piratas/tortuga,studio666/gnu-social,faulteh/gnu-social,foocorp/gnu-social,UngPirat/freesocial,faulteh/gnu-social,gnusocial/mainline,csarven/statusnet,minmb/statusnet,charlycoste/StatusNet,furtherfield/gnu-social,sikevux/bsk-social,bankonme/gnu-social,zcopley/zcopleys-statusnet-clone,charnimda/lgbtpzn-social,zcopley/zcopleys-statusnet-clone,csarven/statusnet,UngPirat/freesocial,eXcomm/gnu-social,zh/statusnet,zh/statusnet,furtherfield/gnu-social,furtherfield/gnu-social,minmb/statusnet,charlycoste/StatusNet,studio666/gnu-social,eXcomm/gnu-social,xebia/statusnet-oauth2,zcopley/StatusNet,eXcomm/gnu-social,sikevux/bsk-social,eXcomm/gnu-social,Piratas/tortuga,faulteh/gnu-social,gnusocial/mainline,zcopley/StatusNet,bankonme/gnu-social,d3vgru/StatusNet,furtherfield/gnu-social,chimo/social,xebia/statusnet-oauth2,d3vgru/StatusNet,foocorp/gnu-social,csarven/statusnet,zcopley/StatusNet,xebia/statusnet-oauth2,studio666/gnu-social