I have just installed subscription modules and it fails on array_merge function because some times not all the parameters are arrays.

Well, we can solve this very easy modifying the code of subscription.module.

Add these lines at the beggining of function subscriptions_page().

$subrowsn[] = array();
$subrowsb[] = array();
$subrowst[] = array();

And ready to go!

PS: I have also attached my subscriptions.module modified.

CommentFileSizeAuthor
subscriptions.module20.67 KBEnekoAlonso-1

Comments

dziemecki’s picture

Could you give me an example of when this fails? I've been on a desert island for a while, so I need a refresher.

TDobes’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

EnekoAlonso: Please submit patches, not full modules.

dziemecki: This is a PHP 5.x related issue. Newer PHP versions are stricter about variable types. PHP requires both parameters to array_merge to be arrays, but one of the parameters we're passing it (on the first iteration) is actually an undefined variable. Defining the variables to initially be empty arrays is the correct fix and will allow use in both PHP 4 and 5 without errors.

This is a duplicate of bug 22849.