1
0

php8 compat: fix missing $args and charset error

This commit is contained in:
onli
2021-03-15 22:32:48 +01:00
parent 9ac2504f4f
commit 391a372a55

View File

@ -169,14 +169,14 @@ if (!function_exists('errorToExceptionHandler')) {
return false;
}
$args = func_get_args();
// Several plugins might not adapt to proper style. This should not completely kill our execution.
if ($serendipity['production'] !== 'debug' && preg_match('@Declaration.*should be compatible with@i', $args[1])) {
#if (!headers_sent()) echo "<strong>Compatibility warning:</strong> Please upgrade file old '{$args[2]}', it contains incompatible signatures.<br/>Details: {$args[1]}<br/>";
return false;
}
$args = func_get_args();
/*
* $serendipity['production'] can be:
*
@ -184,7 +184,6 @@ if (!function_exists('errorToExceptionHandler')) {
* (bool) FALSE Beta/alpha builds
* (string) 'debug' Developer build, specifically enabled.
*/
if ($serendipity['production'] !== 'debug') {
$debug_note = '<br />For more details set $serendipity[\'production\'] = \'debug\' in serendipity_config_local.inc.php to receive a stack-trace.';
} else {
@ -384,7 +383,7 @@ function serendipity_get_bool($item) {
function serendipity_getCharset() {
global $serendipity;
$charset = $serendipity['charset'];
$charset = $serendipity['charset'] ?? '';
if (!empty($_POST['charset'])) {
if ($_POST['charset'] == 'UTF-8/') {
$charset = 'UTF-8/';
@ -554,4 +553,4 @@ function serendipity_entity_decode($string, $flags = null, $encoding = LANG_CHAR
return html_entity_decode($string, $flags, $encoding);
}
/* vim: set sts=4 ts=4 expandtab : */
/* vim: set sts=4 ts=4 expandtab : */