aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/ForumActivity.php
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2023-03-03 21:27:11 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-03-03 21:27:11 +0000
commit930bebbafeb70b813ee83afec9c434838f056413 (patch)
tree0c8e1e1b053524a0ade75990c4d2c751e0203fe2 /lib/classes/ForumActivity.php
parent4292f9fd57bf9869a256674ce3bec938ec11e4ec (diff)
prevent php-warnings, closes #2256
Closes #2256 Merge request studip/studip!1486
Diffstat (limited to 'lib/classes/ForumActivity.php')
-rw-r--r--lib/classes/ForumActivity.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/classes/ForumActivity.php b/lib/classes/ForumActivity.php
index 0e8b3de..63dcbf2 100644
--- a/lib/classes/ForumActivity.php
+++ b/lib/classes/ForumActivity.php
@@ -22,7 +22,7 @@ class ForumActivity
*/
public static function newEntry($event, $topic_id, $post)
{
- $verb = $post['depth'] === 3 ? 'answered' : 'created';
+ $verb = isset($post['depth']) && $post['depth'] === 3 ? 'answered' : 'created';
if ($verb === 'created') {
if (isset($post['depth']) && (int)$post['depth'] === 1) {
@@ -41,7 +41,7 @@ class ForumActivity
* Post activity for updating a forum post
* @param string $event
* @param string $topic_id
- * @param string $post
+ * @param array $post
*/
public static function updateEntry($event, $topic_id, $post)
{
@@ -69,7 +69,7 @@ class ForumActivity
* Post activity for deleting a forum post
* $param string $event
* @param string $topic_id
- * @param string $post
+ * @param array $post
*/
public static function deleteEntry($event, $topic_id, $post)
{