fix: fix a couple undefined variable errors

This commit is contained in:
Floorb 2024-04-25 12:08:25 -04:00
parent 1803631ea9
commit c7eadd4b0c
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ class AbilityHelper {
return $publicly_visible // Everyone can see public pastes
|| ($user !== null && $user->id === $paste->user_id) // Creators of pastes can see their own private pastes
|| $user->role >= User::ROLE_MODERATOR; // Moderators and above can see all pastes
|| ($user !== null && $user->role >= User::ROLE_MODERATOR); // Moderators and above can see all pastes
},
'edit' => function(User | null $user, Paste $paste) {
return $user !== null

View file

@ -155,7 +155,7 @@ $flashes = getFlashes();
<?php if ($current_user): ?>
<div class="hidden" id="js-data-holder" data-user-id="<?= $current_user->id ?>"
data-csrf-token="<?= $csrf_token ?>"></div>
data-csrf-token="<?= isset($csrf_token) ? $csrf_token : '' ?>"></div>
<?php endif; ?>
<div id="#signin" class="modal modal-fx-fadeInScale">