Skip to content

Commit

Permalink
tasks.php: Quell phpstan property access warning
Browse files Browse the repository at this point in the history
It's getting confused by the combination of `!empty($task->...)`
and the fact that task is a stdClass.
  • Loading branch information
bpfoley committed Mar 27, 2024
1 parent 69678a9 commit 8a60462
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ function TaskForm($task)
} else {
echo "<input type='hidden' name='action' value='edit'>\n";
echo "<input type='hidden' name='task_id' value='$task->task_id'>";
$title = "#$task->task_id: " . html_safe($task->task_summary);
$title = "#$task->task_id: " . html_safe($task->task_summary); /** @phpstan-ignore-line */
}
if ($task->opened_by == $requester_u_id && !user_is_a_sitemanager() && !user_is_taskcenter_mgr()) {
echo "<input type='hidden' name='percent_complete' value='$task->percent_complete'>";
Expand All @@ -1230,7 +1230,7 @@ function TaskForm($task)
property_echo_select_tr('task_status', $task->task_status, $tasks_status_array);
property_echo_select_tr('task_assignee', $task->task_assignee, $task_assignees_array);
if ((user_is_a_sitemanager() || user_is_taskcenter_mgr()) && !empty($task->task_id)) {
property_echo_select_tr('percent_complete', $task->percent_complete, $percent_complete_array);
property_echo_select_tr('percent_complete', $task->percent_complete, $percent_complete_array); /** @phpstan-ignore-line */
}
echo "</table>";
echo "</div>";
Expand Down

0 comments on commit 8a60462

Please sign in to comment.