Skip to content

Commit

Permalink
Fix notices and undefined row.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Feb 26, 2014
1 parent 69852fd commit f20b421
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nag/lib/Driver/Sql.php
Expand Up @@ -100,7 +100,7 @@ protected function _getBy($taskIds, $column)
}

if (!is_array($taskIds)) {
$results = new Nag_Task($this, $this->_buildTask(current($rows)));
$results = new Nag_Task($this, $this->_buildTask(reset($rows)));
$this->_tasklist = $results->tasklist;
} else {
$results = new Nag_Task();
Expand Down
4 changes: 3 additions & 1 deletion nag/lib/Ui/VarRenderer/Nag.php
Expand Up @@ -121,7 +121,7 @@ protected function _renderVarInput_NagDue($form, $var, $vars)
$on = $task_due > 0;

/* Set up the radio buttons. */
$html .= sprintf(
$html = sprintf(
'<input id="due_type_none" name="due_type" type="radio" class="radio" value="none"%s />
%s
<br />
Expand Down Expand Up @@ -176,6 +176,8 @@ protected function _renderVarInput_NagAlarm($form, $var, $vars)
$value = array('value' => $value, 'unit' => 1);
}
$value['on'] = true;
} else {
$value = array('on' => false);
}
}
$units = array(1 => _("Minute(s)"), 60 => _("Hour(s)"),
Expand Down

0 comments on commit f20b421

Please sign in to comment.