Skip to content

Commit

Permalink
nullable_htmlentities
Browse files Browse the repository at this point in the history
  • Loading branch information
ssteeltm committed Feb 4, 2025
1 parent 17cd1fd commit 3de97fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tickets_kanban.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$statuses = [];
while ($status_row = mysqli_fetch_array($status_sql)) {
$id = $status_row['ticket_status_id'];
$name = $status_row['ticket_status_name'];
$name = nullable_htmlentities($status_row['ticket_status_name']);
$kanban_order = $status_row['ticket_status_order'];

$statuses[$id] = new stdClass();
Expand Down Expand Up @@ -45,6 +45,13 @@
$ticket_order = $row['ticket_kanban'];
$row['ticket_order'] = $ticket_order; // Store the ticket order

// Loop over all items in $row to apply nullable_htmlentities only if the content is a string
foreach ($row as $key => $value) {
if (is_string($value)) {
$row[$key] = nullable_htmlentities($value);
}
}

if (isset($statuses[$id])) {
$statuses[$id]->tickets[] = $row;
}
Expand Down

0 comments on commit 3de97fc

Please sign in to comment.