Menu

#46 unitialized variable in easymod installer

v0.3.0
closed-fixed
3
2006-09-30
2006-08-13
No

version 0.3, file easymod_install.php, function _sql(...)

there is a line
$error_ary['sql'][] = ( is_array($sql) ) ? $sql[$i] : $sql;

$i is never initialized and therefore evaluates as
zero, so the line still works. But please fix this, it
may suddenly break in later PHP versions.

Discussion

  • Gordon P. Hemsley

    • priority: 5 --> 3
     
  • Gordon P. Hemsley

    Logged In: YES
    user_id=779036

    It's true that $i is not initialized, but I'm not sure that
    $i automatically evaluates to 0, as uninitialized variables
    are NULL. Either way, I'm pretty sure it's already broken,
    so it can't really "break in later PHP versions".

     
  • Eric Faerber

    Eric Faerber - 2006-09-30
    • assigned_to: nobody --> wgeric
    • status: open --> closed-fixed
     
  • Eric Faerber

    Eric Faerber - 2006-09-30

    Logged In: YES
    user_id=657440

    I've changed it to 0 in CVS. I'm not sure if any arrays are
    sent to that function so it probably won't affect anything.

     

Log in to post a comment.

MongoDB Logo MongoDB