phpBB statestic

Current Version: 1.0.2
Released: 04/25/2010
Fire-Fox
Mitglied / Member
Mitglied / Member
Beiträge: 6
Registriert: Di 22. Sep 2009, 01:04
phpbb.com: 1015175

phpBB statestic

Beitrag von Fire-Fox »

Hey!

I get this error :
[phpBB Debug] PHP Notice: in file /includes/stats/stats_settings.php on line 80: Undefined index: 1
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4444: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3635)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4446: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3635)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4447: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3635)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4448: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3635)

Code: Alles auswählen

//now get the counts
                    $sql = 'SELECT user_style FROM ' . USERS_TABLE . '
                                WHERE user_type <> ' . USER_INACTIVE;
                    $result = $db->sql_query($sql);
                    while ($temp_user = $db->sql_fetchrow($result))
                    {
                        ++$style_users_count[$temp_user['user_style']];
                    }
                    $db->sql_freeresult($result);
                    //send vars to template
                    foreach ($styles_data as $current_style)
                    {
                        $template->assign_block_vars('style_users_count', array(
                            'STYLE_NAME'            => $current_style['style_name'],
                            'STYLE_COPYRIGHT'        => $current_style['style_copyright'],
                            'STYLE_USERS_COUNT'        => $style_users_count[$current_style['style_id']],
                        ));
                    }                    
                } 
Benutzeravatar
Marc
Administrator
Administrator
Beiträge: 619
Registriert: Di 2. Sep 2008, 23:48
phpbb.com: Marc
Wohnort: Munich

Re: phpBB statestic

Beitrag von Marc »

It seems like one of your users has his default style set to one that doesn't exist. Make sure all users are set to a style that still exists. For example, if you only have one style, make sure it is set as default for all users.

If you can't find that user, try this:
Open includes/stats/stats_settings.php
Find:

Code: Alles auswählen

                        ++$style_users_count[$temp_user['user_style']]; 
Replace with:

Code: Alles auswählen

                        /** 
                        * Make sure we don't get an undefined index error
                        * this might happen if a user's default style is set to a style that doesn't exist anymore    
                        */
                        if(isset($style_users_count[$temp_user['user_style']]))
                        {
                            ++$style_users_count[$temp_user['user_style']];
                        } 
Bild
Fire-Fox
Mitglied / Member
Mitglied / Member
Beiträge: 6
Registriert: Di 22. Sep 2009, 01:04
phpbb.com: 1015175

Re: phpBB statestic

Beitrag von Fire-Fox »

Working thanks a million :)