1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-06-02 10:13:01 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
Ben Spiegel 53a1567ebf
Merge ff437562e3 into 8ace93e518 2023-12-28 00:08:49 -07:00
Benjamin Spiegel ff437562e3 Fix undefined var in recent change for new comment
With the recent changes module, adding a recent change for a new comment
caused the warning "Undefined variable $comment_thread" if the comment
was not a reply. Use `isset()` instead of `!== NULL` to check for reply
depth, avoiding the warning when $comment_thread is not set.
2023-05-21 23:34:00 -05:00

View file

@ -134,7 +134,7 @@ register_module([
"timestamp" => time(), "timestamp" => time(),
"page" => $env->page, "page" => $env->page,
"user" => $env->user, "user" => $env->user,
"reply_depth" => $comment_thread !== null ? count($comment_thread) : 0, "reply_depth" => isset($comment_thread) ? count($comment_thread) : 0,
"comment_id" => $new_comment->id "comment_id" => $new_comment->id
]); ]);
} }