Development

Changeset 1869

You must first sign up to be able to contribute.

Changeset 1869

Show
Ignore:
Timestamp:
08/30/06 12:42:49 (2 years ago)
Author:
fabien
Message:

fixed index problem when displaying an exception

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/exception/sfException.class.php

    r1415 r1869  
    209209 
    210210      $lines = array(); 
    211       for ($i = max($line - 3, 0), $max = min($line + 3, count($content)); $i <= $max; $i++) 
     211      for ($i = max($line - 3, 1), $max = min($line + 3, count($content)); $i <= $max; $i++) 
    212212      { 
    213213        $lines[] = '<li'.($i == $line ? ' class="selected"' : '').'>'.$content[$i - 1].'</li>'; 
    214214      } 
    215215 
    216       return '<ol start="'.($line - 3).'">'.implode("\n", $lines).'</ol>'; 
     216      return '<ol start="'.max($line - 3, 1).'">'.implode("\n", $lines).'</ol>'; 
    217217    } 
    218218  }