Changeset 2694


Ignore:
Timestamp:
5/25/2012 3:31:00 AM (3 years ago)
Author:
lowjoel
Message:

Fixed a few double-use variables which broke the functions as well as an incomplete SQL Insert.

File:
1 edited

Legend:

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

    r2692 r2694  
    1212} 
    1313 
    14 function GetStackFrameInformation($line) 
     14function GetStackFrameInformation($stackFrame) 
    1515{ 
    1616    //at Eraser.Program.OnGUIInitInstance(Object sender) in D:\Development\Projects\Eraser 6.2\Eraser\Program.cs:line 191 
    1717    $matches = array(); 
    1818    $function = $file = $line = null; 
    19     if (preg_match('/^([^   ]+) (.*) ([^    ]+) (.*):([^    ]+) ([0-9]+)/', $line, $matches)) 
     19    if (preg_match('/^([^   ]+) (.*) ([^    ]+) (.*):([^    ]+) ([0-9]+)/', $stackFrame, $matches)) 
    2020    { 
    2121        $function = $matches[2]; 
     
    2323        $line = intval($matches[6]); 
    2424    } 
    25     else if (preg_match('/^([^  ]+) (.*)/', $line, $matches)) 
     25    else if (preg_match('/^([^  ]+) (.*)/', $stackFrame, $matches)) 
    2626    { 
    2727        $function = $matches[2]; 
     
    210210 
    211211    //Add the dump to the report. 
    212     $statement = $pdo->prepare('INSERT INTO blackbox_dumps SET ReportID=?'); 
     212    $pdo = new Database(); 
     213    $statement = $pdo->prepare('INSERT INTO blackbox_dumps SET ReportID=?, IPAddress=?'); 
     214    $ipAddress = inet_pton($_SERVER['REMOTE_ADDR']); 
    213215    $statement->bindParam(1, $reportId); 
    214     $statement->bindParam(2, inet_pton($_SERVER['REMOTE_ADDR'])); 
     216    $statement->bindParam(2, $ipAddress); 
    215217    try 
    216218    { 
Note: See TracChangeset for help on using the changeset viewer.