Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: EL34 on January 15, 2018, 10:52:35 AM

Title: Error when trying to update from 2.0.14 to 2.0.15
Post by: EL34 on January 15, 2018, 10:52:35 AM
I noticed that one test failed when trying to update 2.0.14 to 2.0.15

This error is because I have the HttpBL mod installed and so it changed the code that the update is looking for

Here is the code that the update is looking for
Code: [Select]
if ($context['sub_action'] == 'query' && !empty($_REQUEST['params']) && empty($_POST))
$_POST += safe_unserialize(base64_decode($_REQUEST['params']));



This is what the HttpBL mod changed that code to

Code: [Select]

if ($context['sub_action'] == 'query' && !empty($_REQUEST['params']) && (empty($_POST)
|| ((isset($_POST['spammers_checks']) || isset($_POST['spammers_report'])) && !empty($_POST['delete']))))
$_POST += safe_unserialize(base64_decode($_REQUEST['params']));




This what the update wants to replace

Code: [Select]

if ($context['sub_action'] == 'query' && empty($_POST))
{
if (!empty($_REQUEST['params']))
{
$_POST += safe_unserialize(base64_decode($_REQUEST['params']));
}
elseif ($context['browser']['is_ie'] && !empty($_SESSION['params']))
{
$_POST += $_SESSION['params'];
unset($_SESSION['params']);
}
}



Can the code above be modified to include the HttpBL code?
If so, can someone give me the new code?

Title: Re: Error when trying to update from 2.0.14 to 2.0.15
Post by: Shambles on January 15, 2018, 12:59:19 PM
Are you sure that code is from the httpBl mod and not the Stop Spammer mod?

https://www.simplemachines.org/community/index.php?topic=283309.msg3948816#msg3948816
Title: Re: Error when trying to update from 2.0.14 to 2.0.15
Post by: EL34 on January 15, 2018, 01:11:53 PM
No, sorry, you are correct
I have Stop Spammer installed also
Title: Re: Error when trying to update from 2.0.14 to 2.0.15
Post by: Shambles on January 15, 2018, 01:24:53 PM
You should find your solution in that support thread I linked.
Title: Re: Error when trying to update from 2.0.14 to 2.0.15
Post by: EL34 on January 15, 2018, 02:16:57 PM
Thanks, Kindred had the code I was looking for