bugphpGroupWare - Bugs: bug #7368, Bug in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7368: Bug in php3_support_functions.inc.php

Submitted by:  Kai Hofmann <powerstat>
Submitted on:  Wed 21 Jan 2004 08:08:29 PM UTC  
 
Item Group: SVN trunk (dev code)Category: API - phpGroupware API
Severity: 6 - SecurityPriority: 9 - Immediate
Status: InvalidPrivacy: Public
Assigned to: Dave Hall <skwashd>Open/Closed: Closed
Component Version: SVNOperating System: None
Reproducibility: NonePlanned Release: None
Fixed Release: 

Thu 22 Jan 2004 12:09:47 PM UTC, comment #2:

Could be optimized as:

function array_keys ($arr, $term='')
{
$t = array();
while (list($k,$v) = each($arr))
{
if (!$term || $v == $term)
{
$t[] = $k;
}
}
return $t;
}

Kai Hofmann <powerstat>
Wed 21 Jan 2004 08:54:41 PM UTC, comment #1:

Support for PHP3, is dropped as of 0.9.16

The HEAD code still needs to be updated to reflect this change.

Dave Hall <skwashd>
Project AdministratorIn charge of this item.
Wed 21 Jan 2004 08:08:29 PM UTC, original submission:

function array_keys ($arr, $term='')
{
$t = array();
while (list($k,$v) = each($arr))
{
if ($term && $v != $term)
{
continue;
$t[] = $k;
}
return $t;
}
}

Bug - because of code after "continue" -> result always empty array
Bug - unknown return value when $term will never match

Should better be:

function array_keys ($arr, $term='')
{
$t = array();
while (list($k,$v) = each($arr))
{
if ($term && $v != $term)
{
continue;
}
$t[] = $k;
}
return $t;
}

Kai Hofmann <powerstat>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 21 Jan 2004 08:54:41 PM UTCskwashdStatusNone=>Invalid
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1