forked from extern/egroupware
Convert foreach to while loop
This commit is contained in:
parent
5efdffad7b
commit
b51bb7b055
@ -256,7 +256,8 @@
|
|||||||
|
|
||||||
if (is_array($b))
|
if (is_array($b))
|
||||||
{
|
{
|
||||||
foreach ($b as $id => $cont)
|
@reset($b);
|
||||||
|
while(list($id,$cont) = @each($b))
|
||||||
{
|
{
|
||||||
$b[$id] = $cont->scalarval();
|
$b[$id] = $cont->scalarval();
|
||||||
}
|
}
|
||||||
@ -266,11 +267,13 @@
|
|||||||
if (is_object($b))
|
if (is_object($b))
|
||||||
{
|
{
|
||||||
$t = get_object_vars($b);
|
$t = get_object_vars($b);
|
||||||
foreach ($t as $id => $cont)
|
@reset($t);
|
||||||
|
while(list($id,$cont) = @each($t))
|
||||||
{
|
{
|
||||||
$t[$id] = $cont->scalarval();
|
$t[$id] = $cont->scalarval();
|
||||||
}
|
}
|
||||||
foreach ($t as $id => $cont)
|
@reset($t);
|
||||||
|
while(list($id,$cont) = @each($t))
|
||||||
{
|
{
|
||||||
eval('$b->'.$id.' = $cont;');
|
eval('$b->'.$id.' = $cont;');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user