Originally Posted by
johnjlarge
Spoke too soon.
Uploaded USU 3.0.5 from the plugins repository and received the following error :-
[03-Apr-2020 08:35:11 UTC] PHP Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in /home/koolbadg/public_html/includes/classes/usu.php on line 288
[03-Apr-2020 08:35:11 UTC] Request URI: /, IP address: 109.151.51.216
--> PHP Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in /home/koolbadg/public_html/includes/classes/usu.php on line 288.
Well, crud. You can correct the issue by editing /includes/classes/usu.php's add_sid method:
Code:
protected function add_sid($link, $add_session_id, $connection, $separator)
{
global $request_type, $http_domain, $https_domain, $session_started;
$_sid = '';
if ($add_session_id == true && $session_started && SESSION_FORCE_COOKIE_USE == 'False') {
if (defined('SID') && !empty(constant('SID'))) {
$_sid = constant('SID');
} else {
$ssl_enabled = (IS_ADMIN_FLAG === true) ? ENABLE_SSL_CATALOG : ENABLE_SSL;
if (($request_type == 'NONSSL' && $connection == 'SSL' && $ssl_enabled == 'true') || ($request_type == 'SSL' && $connection == 'NONSSL')) {
if ($http_domain != $https_domain) {
$_sid = zen_session_name() . '=' . zen_session_id();
}
}
}
... adding the missing curly-brace:
Code:
protected function add_sid($link, $add_session_id, $connection, $separator)
{
global $request_type, $http_domain, $https_domain, $session_started;
$_sid = '';
if ($add_session_id == true && $session_started && SESSION_FORCE_COOKIE_USE == 'False') {
if (defined('SID') && !empty(constant('SID'))) {
$_sid = constant('SID');
} else {
$ssl_enabled = (IS_ADMIN_FLAG === true) ? ENABLE_SSL_CATALOG : ENABLE_SSL;
if (($request_type == 'NONSSL' && $connection == 'SSL' && $ssl_enabled == 'true') || ($request_type == 'SSL' && $connection == 'NONSSL')) {
if ($http_domain != $https_domain) {
$_sid = zen_session_name() . '=' . zen_session_id();
}
}
}
}
I'll get a quick v3.0.6 release (er) released. Thanks a bunch for the report!
Bookmarks