Menu

#82 warning: variable passed to each ..

OPT_0.9.X
closed-fixed
Calendar (6)
5
2004-12-08
2002-12-05
Anonymous
No

PHP error is as follows:

warning: variable passed to each is not an array in
people/admin/update.inc line 75

original:

while(list(,$xtra)=each($xtramail)) {
if (!$xtra) {
continue;
}
$result_id=OPT_run_query($sql_id);
list($xtra_id)=OPT_fetch_row($result_id);
$sql="insert into mail_xtra set id='$xtra_id',
entry_type='people', entry_id='$id', email='$xtra'";
OPT_run_query($sql);
}

with fix:

if (is_array($xtramail)
{
while(list(,$xtra)=each($xtramail)) {
if (!$xtra) {
continue;
}
$result_id=OPT_run_query($sql_id);
list($xtra_id)=OPT_fetch_row($result_id);
$sql="insert into mail_xtra set id='$xtra_id',
entry_type='people', entry_id='$id', email='$xtra'";
OPT_run_query($sql);
}
}

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Forgot to mention in the previous post that version number is
    0.946 (beta) and my contact info is:

    Ryan Yagatich ryany@pantek.com
    http://www.pantek.com

     
  • Anonymous

    Anonymous - 2003-06-27
    • milestone: --> OPT_0.9.X
     
  • Martin Vernooij

    Martin Vernooij - 2004-12-08
    • status: open --> closed
     
  • Martin Vernooij

    Martin Vernooij - 2004-12-08

    Logged In: YES
    user_id=608879

    Well, this one appears to be fixed also, but not documented
    explicitly, nor has this bug been closed.

    Fixing the closure of the bug report now ....

    Martin

     
  • Martin Vernooij

    Martin Vernooij - 2004-12-08
    • status: closed --> closed-fixed
     

Log in to post a comment.