Skip to content

Commit

Permalink
Fix undefined issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dvz committed Apr 12, 2024
1 parent 9a701b2 commit d22b2b5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin/modules/user/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ function toggleBox(action)
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc"));
$admin_view = $db->fetch_array($query);

if($mybb->input['type'])
if(!empty($mybb->input['type']))
{
$admin_view['view_type'] = $mybb->input['type'];
}
Expand Down
1 change: 1 addition & 0 deletions inc/3rdparty/diff/Diff/Engine/Native.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}

#[AllowDynamicProperties]
class Horde_Text_Diff_Engine_Native
{
public function diff($from_lines, $to_lines)
Expand Down
6 changes: 3 additions & 3 deletions member.php
Original file line number Diff line number Diff line change
Expand Up @@ -1660,7 +1660,7 @@
require_once MYBB_ROOT.'inc/datahandlers/user.php';
$userhandler = new UserDataHandler('update');

while(!$userhandler->verify_password())
do
{
$password = random_str($password_length, $mybb->settings['requirecomplexpasswords']);

Expand All @@ -1673,13 +1673,13 @@

$userhandler->set_validated(true);
$userhandler->errors = array();
}
} while(!$userhandler->verify_password());

$userhandler->update_user();

$logindetails = array(
'salt' => $userhandler->data['salt'],
'password' => $userhandler->data['saltedpw'],
'password' => $userhandler->data['password'],
'loginkey' => $userhandler->data['loginkey'],
);

Expand Down
13 changes: 13 additions & 0 deletions showthread.php
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,19 @@
$thread['notes'] = my_substr($thread['notes'], 0, 200)."... {$viewnotes}";
}

if(!isset($collapsedthead['threadnotes']))
{
$collapsedthead['threadnotes'] = '';
}
if(!isset($collapsedimg['threadnotes']))
{
$collapsedimg['threadnotes'] = '';
}
if(!isset($collapsed['threadnotes_e']))
{
$collapsed['threadnotes_e'] = '';
}

$expaltext = (in_array("threadnotes", $collapse)) ? $lang->expcol_expand : $lang->expcol_collapse;
eval("\$threadnotesbox = \"".$templates->get("showthread_threadnotes")."\";");
}
Expand Down

0 comments on commit d22b2b5

Please sign in to comment.