Browse Source

Minor - fix php warnings

Julio Montoya 6 years ago
parent
commit
47f2f4f47a
3 changed files with 6 additions and 7 deletions
  1. 1 2
      main/forum/index.php
  2. 3 3
      main/forum/viewforum.php
  3. 2 2
      main/forum/viewthread.php

+ 1 - 2
main/forum/index.php

@@ -128,8 +128,7 @@ $logInfo = [
     'tool_id_detail' => 0,
     'action' => !empty($actions) ? $actions : 'list-category',
     'action_details' => isset($_GET['content']) ? $_GET['content'] : '',
-    'current_id' => !empty($actions) ? (int) $_GET['id'] : 0,
-    'info' => '',
+    'current_id' => isset($_GET['id']) ? $_GET['id'] : 0,
 ];
 Event::registerLog($logInfo);
 

+ 3 - 3
main/forum/viewforum.php

@@ -108,8 +108,8 @@ $logInfo = [
     'tool_id' => $my_forum,
     'tool_id_detail' => 0,
     'action' => !empty($my_action) ? $my_action : 'list-threads',
-    'action_details' => $_GET['content'],
-    'current_id' => !empty($my_action) ? (int) $_GET['id'] : 0,
+    'action_details' => isset($_GET['content']) ? $_GET['content'] : '',
+    'current_id' => isset($_GET['id']) ? $_GET['id'] : 0,
 ];
 Event::registerLog($logInfo);
 
@@ -155,7 +155,7 @@ if ($origin == 'learnpath') {
     Display::display_reduced_header();
 } else {
     // The last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string.
-    Display::display_header('');
+    Display::display_header();
 }
 
 /* Actions */

+ 2 - 2
main/forum/viewthread.php

@@ -131,8 +131,8 @@ $logInfo = [
     'tool_id' => $_GET['forum'],
     'tool_id_detail' => $_GET['thread'],
     'action' => !empty($my_action) ? $my_action : 'view-thread',
-    'action_details' => $_GET['content'],
-    'current_id' => !empty($my_action) ? (int) $_GET['id'] : 0,
+    'action_details' => isset($_GET['content']) ? $_GET['content'] : '',
+    'current_id' => isset($_GET['id']) ? $_GET['id'] : 0,
 ];
 Event::registerLog($logInfo);