White screen when going to /og/og_subscribers

Max_Headroom - October 17, 2007 - 06:10
Project:OG Subscriber Management
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:dwees
Status:active
Description

Hi
I get an error when I click on Subscriber Management:

Fatal error: Call to undefined function: array_combine() in /home/user/public_html/sites/all/modules/og_management/og_management.module on line 299

So before I call it a bug; maybe I've done something wrong? Something missing?
I've enable OG and created users and roles. I've assigned roles in the OG setup.

#1

dwees - October 17, 2007 - 07:37

Hrmm, can you let me know which version of Php you are using? The array_combine function may be Php 5 only.

If this shows up on every page, you can disable the module in the system table manually using some database manipulation like phpmyadmin.

I'll take a closer look at the documentation for array_combine and see if I can work out an alternative.

Dave

#2

Max_Headroom - October 17, 2007 - 19:41

Hmm, I wasn't wearing my PHP cap:
You are correct, this server runs PHP 4.4.4

I replaced line 299 with this:

<?php
        $options
= array();
        foreach(
$user_roles as $Q_key1 => $Q_value1)    {
           
$options[$Q_value1] = $all_roles[$Q_key1];
        }
?>

Got the idea from http://www.php.net/array_combine.

#3

Memeshift - May 14, 2008 - 22:51
Title:Error when accesing module» White screen when going to /og/og_subscribers

I was getting a white screen when i would navigate to /og/og_subscribers. When i went in and added the code above in #2, it resolved the problem. thanks!

#4

dwees - July 24, 2008 - 14:35
Assigned to:Anonymous» dwees

Since Drupal 5 is supposed to be Php 4.4 friendly, I'll have to commit this fix to the module in the 5.x version. We'll see if a 6.x version of this is necessary.

Dave

#5

alb - October 12, 2008 - 14:32

work but not completely:
infact I tested and see that not all the roles in admin/og/og_subscribers are listed;
first rows are blank;

with php5 I have all roles;

At me work also with in php 4.x but in an installation where i made many setting
so not know why it work , infact in a fresh installation of OG not work.

 
 

Drupal is a registered trademark of Dries Buytaert.