handled a corner case of no author in the code history
This commit is contained in:
parent
4a2a119bec
commit
c31e4aebb8
@ -654,10 +654,14 @@ class Code extends Controller
|
||||
for ($i = 0; $i < $history_count; $i++)
|
||||
{
|
||||
$h = $history[$i];
|
||||
if (array_key_exists ($h['author'], $stats))
|
||||
$stats[$h['author']]++;
|
||||
else
|
||||
$stats[$h['author']] = 1;
|
||||
if (array_key_exists ('author', $h))
|
||||
{
|
||||
$author = $h['author'];
|
||||
if (array_key_exists ($author, $stats))
|
||||
$stats[$author]++;
|
||||
else
|
||||
$stats[$author] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->library ('PHPGraphLibPie', array ('width' => 400, 'height' => 300), 'graph');
|
||||
@ -673,10 +677,14 @@ class Code extends Controller
|
||||
for ($i = 0; $i < $history_count; $i++)
|
||||
{
|
||||
$h = $history[$i];
|
||||
if (array_key_exists ($h['author'], $stats))
|
||||
$stats[$h['author']]++;
|
||||
else
|
||||
$stats[$h['author']] = 1;
|
||||
if (array_key_exists ('author', $h))
|
||||
{
|
||||
$author = $h['author'];
|
||||
if (array_key_exists ($author, $stats))
|
||||
$stats[$author]++;
|
||||
else
|
||||
$stats[$author] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->library ('PHPGraphLib', array ('width' => 400, 'height' => 300), 'graph');
|
||||
|
Loading…
Reference in New Issue
Block a user