mirror of
https://github.com/itflow-org/itflow
synced 2026-03-14 17:54:52 +00:00
Check that a credential is shared before attempting to display the details to prevent debug error messages
This commit is contained in:
@@ -198,6 +198,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
AND item_related_id = $login_id
|
AND item_related_id = $login_id
|
||||||
LIMIT 1"
|
LIMIT 1"
|
||||||
);
|
);
|
||||||
|
if (mysqli_num_rows($sql_shared) > 0) {
|
||||||
$row = mysqli_fetch_array($sql_shared);
|
$row = mysqli_fetch_array($sql_shared);
|
||||||
$item_id = intval($row['item_id']);
|
$item_id = intval($row['item_id']);
|
||||||
$item_active = nullable_htmlentities($row['item_active']);
|
$item_active = nullable_htmlentities($row['item_active']);
|
||||||
@@ -210,6 +211,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
$item_created_at = nullable_htmlentities($row['item_created_at']);
|
||||||
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
$item_expire_at = nullable_htmlentities($row['item_expire_at']);
|
||||||
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
$item_expire_at_human = timeAgo($row['item_expire_at']);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -237,7 +239,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
|||||||
<td><?php echo $otp_display; ?></td>
|
<td><?php echo $otp_display; ?></td>
|
||||||
<td><?php echo $login_uri_display; ?></td>
|
<td><?php echo $login_uri_display; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if($item_id) { ?>
|
<?php if (mysqli_num_rows($sql_shared) > 0) { ?>
|
||||||
<div title="Expires <?php echo $item_expire_at_human; ?>">
|
<div title="Expires <?php echo $item_expire_at_human; ?>">
|
||||||
<i class="fas fa-fw fa-link"></i> Shared
|
<i class="fas fa-fw fa-link"></i> Shared
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user