diff --git a/include/compat.inc.php b/include/compat.inc.php
index 101bdd1a..a22b809e 100644
--- a/include/compat.inc.php
+++ b/include/compat.inc.php
@@ -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 "Compatibility warning: Please upgrade file old '{$args[2]}', it contains incompatible signatures.
Details: {$args[1]}
";
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 = '
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 : */
\ No newline at end of file