Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Error occurs when specified $run_id is invalid.
  • Loading branch information
Hiroaki Sone committed Oct 5, 2014
1 parent f3eb777 commit 60ecfa1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xhprof_lib/utils/xhprof_runs.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ public function get_run($run_id, $type, &$run_desc)
$query = "SELECT * FROM `details` WHERE `id` = '$run_id'";
$resultSet = $this->db->query($query);
$data = $this->db->getNextAssoc($resultSet);


// can't find specified data
if (empty($data)) {
return array(null, null);
}

//The Performance data is compressed lightly to avoid max row length
if (!isset($GLOBALS['_xhprof']['serializer']) || strtolower($GLOBALS['_xhprof']['serializer'] == 'php')) {
$contents = unserialize(gzuncompress($data['perfdata']));
Expand Down

0 comments on commit 60ecfa1

Please sign in to comment.