Skip to content

Commit

Permalink
Fix Phan static analysis errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ay-bh committed Oct 26, 2024
1 parent 1e5294e commit 44f42e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/issue_tracker/php/edit.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,14 @@ class Edit extends \NDB_Page implements ETagCalculator
$db = $this->loris->getDatabaseConnection();
$assignees = [];
$otherWatchers = [];
$centerIDsArray = [];
$dccID = null;
$centerPlaceholders = '';

// Initialize variables based on permissions
if (!$user->hasPermission('access_all_profiles')) {
$centerIDsArray = array_map(
fn($centerID) => (int)$centerID->getID(),
fn($centerID) => (int)$centerID->__toString(),
$user->getCenterIDs()
);

Expand All @@ -317,7 +320,7 @@ class Edit extends \NDB_Page implements ETagCalculator
"SELECT CenterID FROM psc WHERE Name = :name",
['name' => 'DCC']
);
$dccID = $dccRow ? $dccRow['CenterID'] : null;
$dccID = $dccRow ? (int)$dccRow: null;

// Prepare placeholders
$centerPlaceholders = implode(
Expand Down

0 comments on commit 44f42e9

Please sign in to comment.