Changeset 1672


Ignore:
Timestamp:
1/25/2010 6:02:12 AM (5 years ago)
Author:
lowjoel
Message:
  • Fixed parsing of stack frames after changing the regex
  • Include the very first stack frame - comparing int to string caused the string 'exception' to be cast to int 0, hence the equality was true and the comparison skipped for element 0
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/website/scripts/blackbox/upload.php

    r1671 r1672  
    7777        { 
    7878            //Ignore the exception key; that stores the exception type. 
    79             if ($stackIndex == 'exception') 
     79            if ((string)$stackIndex == 'exception') 
    8080                continue; 
    8181             
     
    8585            if (preg_match('/^([^   ]+) (.*) ([^    ]+) (.*):([^    ]+) ([0-9]+)/', $stackFrame, $matches)) 
    8686            { 
    87                 $function = $matches[1]; 
    88                 $file = $matches[2]; 
    89                 $line = intval($matches[3]); 
     87                $function = $matches[2]; 
     88                $file = $matches[4]; 
     89                $line = intval($matches[6]); 
    9090            } 
    9191            else if (preg_match('/^([^  ]+) (.*)/', $stackFrame, $matches)) 
    9292            { 
    93                 $function = $matches[1]; 
     93                $function = $matches[2]; 
    9494            } 
    9595             
Note: See TracChangeset for help on using the changeset viewer.