Re: Bugs web bug :)

From: Date: Mon, 28 Jan 2002 15:43:09 +0000
Subject: Re: Bugs web bug :)
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-4326@lists.php.net to get a copy of this message
At 15:04 2002-01-28 +0100, Jan Lehnardt wrote:
Hi, On Mon, 28 Jan 2002 20:36:23 +0900 Yasuo Ohgaki <yasuo_ohgaki@yahoo.com> wrote: Currently displaying all bugs. Display only PHP3 bugs or only PHP4 bugs. Fatal error: Cannot increment/decrement overloaded objects nor string offsets in /local/Web/sites/php-bugs-web/bugstats.php on line 42 while($row=mysql_fetch_array($result)) {
        $bug_type['all'][$row[bug_type]]++;
        $status = strtolower($row['status']);
        if ($status == 'closed' || $status == 'bogus') {
                $closed_by[$row['dev_id']]++;
        }
        $bug_type[$status][$row[bug_type]]++;
        $bug_type[$status]['all']++;
        $email[$row[email]]++;
        $php_version[$row[php_version]]++;
        $php_os[$row[php_os]]++;
        $status[$row['status']]++; // Line 42
        $total++;
} I can't even imagine what these lines are supposed to do. Especially 37 to 42. According to the if statement $staus should be a string, as well as $row['status']. So what is the sense of $status[$row['status']]++; ?
*** $status should probably be an associative array with numerical values. Setting $status to strToLower($row['status']) seems very odd. A better solution would be to store the lowercase values into the database directly. hellekin

« previous php.qa (#4326) next »