MyBB Community Forums

Full Version: Error message whilst trying to warn people?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So basically i'm getting this error,


[Image: 77NraiW.jpg]
Any idea's of what's gone wrong here?



This is the line of code,

Quote:if(!modcp_can_manage_user($user['uid']))


Can anyone help?
which version of MyBB exactly you are using ?
run file verification tool available at tools & maintenance section of admin panel to find missing / changed files.
ignore files reported from install folder & its subfolders. you have to replace reported files from MyBB source
files pack
of your forum's version.
I'm running 1.8.3. and this is the errror i got. [Image: UP3bBTq.jpg]

So just reupload that folder?

this is the code inside of the folder. 
Quote:
  1. <?php

  2. /**

  3. * MyBB 1.8

  4. * Copyright 2014 MyBB Group, All Rights Reserved

  5. *

  6. * Website: http://www.mybb.com

  7. * License: http://www.mybb.com/about/license

  8. *

  9. */

  10.  

  11. function find_warnlevels_to_check(&$query, &$max_expiration_times, &$check_levels)

  12. {

  13. global $db;

  14.  

  15. // we have some warning levels we need to revoke

  16. $max_expiration_times = array(

  17. 1 => -1, // Ban

  18. 2 => -1, // Revoke posting

  19. 3 => -1 // Moderate posting

  20. );

  21. $check_levels = array(

  22. 1 => false, // Ban

  23. 2 => false, // Revoke posting

  24. 3 => false // Moderate posting

  25. );

  26. while($warn_level = $db->fetch_array($query))

  27. {

  28. // revoke actions taken at this warning level

  29. $action = my_unserialize($warn_level['action']);

  30. if($action['type'] < 1 || $action['type'] > 3) // prevent any freak-ish cases

  31. {

  32. continue;

  33. }

  34.  

  35. $check_levels[$action['type']] = true;

  36.  

  37. $max_exp_time = &$max_expiration_times[$action['type']];

  38. if($action['length'] && $max_exp_time != 0)

  39. {

  40. $expiration = $action['length'];

  41. if($expiration > $max_exp_time)

  42. {

  43. $max_exp_time = $expiration;

  44. }

  45. }

  46. else

  47. {

  48. $max_exp_time = 0;

  49. }

  50. }

  51. }

  52.  

  53. /**

  54. * Returns a friendly expiration time of a suspension/warning

  55. *

  56. * @param int The time period of the suspension/warning

  57. * @return array An array of the time/period remaining

  58. */

  59. function fetch_friendly_expiration($time)

  60. {

  61. if($time == 0 || $time == -1)

  62. {

  63. return array("period" => "never");

  64. }

  65. else if($time % 2592000 == 0)

  66. {

  67. return array("time" => $time/2592000, "period" => "months");

  68. }

  69. else if($time % 604800 == 0)

  70. {

  71. return array("time" => $time/604800, "period" => "weeks");

  72. }

  73. else if($time % 86400 == 0)

  74. {

  75. return array("time" => $time/86400, "period" => "days");

  76. }

  77. else

  78. {

  79. return array("time" => ceil($time/3600), "period" => "hours");

  80. }

  81. }

  82.  

  83. /**

  84. * Figures out the length of a suspension/warning

  85. *

  86. * @param int The amount of time to calculate the length of suspension/warning

  87. * @param string The period of time to calculate the length of suspension/warning

  88. * @return int Length of the suspension/warning (in seconds)

  89. */

  90. [b]function fetch_time_length($time, $period)[/b]

  91. {

  92. $time = (int)$time;

  93.  

  94. if($period == "hours")

  95. {

  96. $time = $time*3600;

  97. }

  98. else if($period == "days")

  99. {

  100. $time = $time*86400;

  101. }

  102. else if($period == "weeks")

  103. {

  104. $time = $time*604800;

  105. }

  106. else if($period == "months")

  107. {

  108. $time = $time*2592000;

  109. }

  110. else if($period == "never" && $time == 0)

  111. {

  112. // User is permanentely banned

  113. $time = "-1";

  114. }

  115. else

  116. {

  117. $time = 0;

  118. }

  119. return $time;

  120. }

  121.  
Nevermind, fixed it thanks for your help .m.!