php8 compat fix: $lang and $cond['joins'] unset before access
This commit is contained in:
@@ -1055,7 +1055,9 @@ function serendipity_getSessionLanguage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// cache the result
|
// cache the result
|
||||||
if ($lang) $serendipity['detected_lang'] = $lang;
|
if (isset($lang) && $lang) {
|
||||||
|
$serendipity['detected_lang'] = $lang;
|
||||||
|
}
|
||||||
|
|
||||||
// try configuration: blog default language
|
// try configuration: blog default language
|
||||||
if (empty($lang) && $serendipity['lang']) {
|
if (empty($lang) && $serendipity['lang']) {
|
||||||
@@ -1918,6 +1920,10 @@ function serendipity_ACL_SQL(&$cond, $append_category = false, $type = 'category
|
|||||||
$read_id_sql = 0;
|
$read_id_sql = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! array_key_exists('joins', $cond) ) {
|
||||||
|
$cond['joins'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
if ($append_category) {
|
if ($append_category) {
|
||||||
if ($append_category !== 'limited') {
|
if ($append_category !== 'limited') {
|
||||||
$cond['joins'] .= " LEFT JOIN {$serendipity['dbPrefix']}entrycat ec
|
$cond['joins'] .= " LEFT JOIN {$serendipity['dbPrefix']}entrycat ec
|
||||||
@@ -1941,10 +1947,6 @@ function serendipity_ACL_SQL(&$cond, $append_category = false, $type = 'category
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! array_key_exists('joins', $cond) ) {
|
|
||||||
$cond['joins'] = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$cond['joins'] .= " LEFT JOIN {$serendipity['dbPrefix']}authorgroups AS acl_a
|
$cond['joins'] .= " LEFT JOIN {$serendipity['dbPrefix']}authorgroups AS acl_a
|
||||||
ON acl_a.authorid = " . $read_id . "
|
ON acl_a.authorid = " . $read_id . "
|
||||||
LEFT JOIN {$serendipity['dbPrefix']}access AS acl_acc
|
LEFT JOIN {$serendipity['dbPrefix']}access AS acl_acc
|
||||||
|
Reference in New Issue
Block a user