Module works ass expected unless I am an anonymous user, in which case i get the following error on every page of the site.

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/vhosts/shareholdersfoundation.com/httpdocs/sites/all/modules/views_embed_form 2/views_embed_form.module on line 124.

Any help is appreciated

Comments

break9’s picture

just kidding. I wrote a module to play with this one and it was causing the issue.

meba’s picture

Status: Active » Closed (fixed)

Closing...

heacu’s picture

hi, i just wanted to say that i got this error message as well, again related to roles/permissions. what went wrong was that my own hook_views_embed_form was failing to return an empty array in case permissions to access the form were not met. so, i added the line at the end of the function below. am just offering this up in case anybody runs into this problem.

function elarmod_views_embed_form() {
global $user;
if ($user->uid==1 || in_array('staff', $user->roles)) {
return array('elarmod_personselect_form' => 'ELAR person select form');
}
//this part critical or else an error is thrown by views_embed_form module
return array();
}