From 9014ca45f3370eac3900d1343ee5a85f591de25c Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Thu, 26 Jan 2023 21:26:22 +0100 Subject: [PATCH] handle case where user is null in interactions --- Views/appreciations/view_single.php | 7 ++++++- Views/recipe/view.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Views/appreciations/view_single.php b/Views/appreciations/view_single.php index 8c64d4e..3a119ce 100644 --- a/Views/appreciations/view_single.php +++ b/Views/appreciations/view_single.php @@ -8,7 +8,12 @@
Le = $O_appr->S_DATE ?>
= $O_appr->I_NOTE ?>/5
- I_AUTHOR_ID) { ?> + I_AUTHOR_ID && $O_appr->I_AUTHOR_ID !== null) + ); + if ($B_can_delete) { ?> Supprimer l'appréciation diff --git a/Views/recipe/view.php b/Views/recipe/view.php index f5783dc..cdd8e20 100644 --- a/Views/recipe/view.php +++ b/Views/recipe/view.php @@ -37,7 +37,12 @@ $O_recipe = $A_view["RECIPE"];By = $O_recipe->getAuthorOrAnon()->S_USERNAME ?>
- I_AUTHOR_ID) { ?> + I_AUTHOR_ID && $O_appr->I_AUTHOR_ID !== null) + ); + if ($B_can_interact) { ?>