Package: gforge-common
Version: 4.8.1-1
Severity: normal

Hello! I've found this problem on one of my projects in FusionForge:
When I try to do admin things on that URL:

 https://myffhost/docman/admin/index.php?group_id=20

I get nothing in the list, except '* active'. The apache2's error log
says:

 PHP Fatal error:  Call to a member function hasDocuments() on a
 non-object in /usr/share/gforge/common/docman/DocumentGroup.class.php
 on line 272, referer: https://myffhost/docman/?group_id=20

Well, see there:

 if ($nested_groups["$doc_group_id"][$i]->hasDocuments($nested_groups, 
$document_factory, $stateid))

which is a part of 

 // this group doesn't have documents... check recursively on the childs
 if (is_array($nested_groups["$doc_group_id"])) {
         $count = count($nested_groups["$doc_group_id"]);
                         for ($i=0; $i < $count; $i++) {
                                        if 
($nested_groups["$doc_group_id"][$i]->hasDocuments($nested_groups, 
$document_factory, $stateid)) {
                                                // child has documents
                        $result[$stateid][$doc_group_id] = true;
                                                return true;
                                                }
                                        }
                                // no child has documents, then this group 
doesn't have associated documents
                                $result[$stateid][$doc_group_id] = false;
                                return false;
                        } else {        
                                        
                                        // this group doesn't have childs
                    $result[$stateid][$doc_group_id] = false;
                                        return false; 
                        }

This problem only appears on one project, which has 4 and more levels of
document grouping hierarchy. Other projects are ok. This is very
unpleasant bug, i don't have enough PHP experience to fix it (there is a
recursive function which is hard to debug).


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to