From: Jonathan A. <jan...@us...> - 2005-11-06 04:11:16
|
Update of /cvsroot/squirrelmail/squirrelmail/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23369/src Modified Files: Tag: SM-1_4-STABLE read_body.php Log Message: Undefined index in rare situations when trying to calculate prev/next links in attached messages. Need to speak to cor about plugins as I'm not able to find any way to reproduce his error, though this will fix it. Index: read_body.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/src/read_body.php,v retrieving revision 1.283.2.23 retrieving revision 1.283.2.24 diff -u -w -r1.283.2.23 -r1.283.2.24 --- read_body.php 16 Apr 2005 17:45:40 -0000 1.283.2.23 +++ read_body.php 6 Nov 2005 04:11:01 -0000 1.283.2.24 @@ -591,7 +591,7 @@ } $prev_link = _("Previous"); - if($entities[$passed_ent_id] > 1) { + if (!empty($entities[$passed_ent_id]) && ($entities[$passed_ent_id] > 1)) { $prev_ent_id = $entity_count[$entities[$passed_ent_id] - 1]; $prev_link = '<a href="' . set_url_var($PHP_SELF, 'passed_ent_id', $prev_ent_id) @@ -599,7 +599,7 @@ } $next_link = _("Next"); - if($entities[$passed_ent_id] < $c) { + if (!empty($entities[$passed_ent_id]) && ($entities[$passed_ent_id] < $c)) { $next_ent_id = $entity_count[$entities[$passed_ent_id] + 1]; $next_link = '<a href="' . set_url_var($PHP_SELF, 'passed_ent_id', $next_ent_id) |