Function subscriptions_get() just does not run cause db_select is missing fields. Should be something like this I guess:

$query = db_select('subscriptions', 's')->fields('s');

Also, I think that function is sort of useful despite the strange way it builds the resulting array. Is there a $php pattern that makes the following construction useful?

foreach ($query->execute() as $s) {
    $subscriptions[$s->recipient_uid][$s->module][$s->field][$s->value][$s->author_uid] = 1;
}

Comments

salvis’s picture

Status: Active » Closed (works as designed)

This was fixed in #1853644: subscriptions_get generates pdo exception, no? Feel free to reopen if necessary.

You could use nested foreach loops to iterate over the result array.

That function is a left-over from the D5 code and not used anywhere in Subscriptions — I'm not sure it's useful. But kimwes apparently used it.