From:             tila at home dot nl
Operating system: Linux 2.4.24
PHP version:      5.0.0
PHP Bug Type:     PostgreSQL related
Bug description:  Client crash

Description:
------------
The client crash on the following code when offset > 0;
I don't get an error message.





Reproduce code:
---------------
  $result = $db->query($QUERY);
  $total = $result->numRows();
  $back = max (0, $offset - $perpage);
  $forward = min (($offset + $perpage), max (0, (($perpage * ceil ($total
/ $perpage)) - $perpage)));
  $end = max (0, (($perpage * ceil ($total / $perpage)) - $perpage));
   
  $overviewtemplate->setVariable("back", $back);
  $overviewtemplate->setVariable("forward", $forward);
  $overviewtemplate->setVariable("end", $end);
 
  for ($i = $offset; (($i < $total) && ($i < ($offset + $perpage))); $i++)
{
    $row = $result->fetchRow(DB_FETCHMODE_ASSOC, $i);
    while (list($key, $value) = each($row)) {
      $row[$key] = stripslashes(trim($row[$key]));
    } 
  }


-- 
Edit bug report at http://bugs.php.net/?id=29180&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29180&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29180&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=29180&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=29180&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=29180&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=29180&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=29180&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=29180&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=29180&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=29180&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=29180&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=29180&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29180&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=29180&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=29180&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=29180&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29180&r=float

Reply via email to