Fix compatibility with PHP 8.1 (#1324)
* Fix compatibility with PHP 8.1 PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in typecho/var/Widget/Archive.php on line 1292 * Fix login * Fix write * Fix manage * Fix PHP Deprecated
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ include 'common.php';
|
||||
if ($user->hasLogin()) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
$rememberName = htmlspecialchars(\Typecho\Cookie::get('__typecho_remember_name'));
|
||||
$rememberName = htmlspecialchars(\Typecho\Cookie::get('__typecho_remember_name', ''));
|
||||
\Typecho\Cookie::delete('__typecho_remember_name');
|
||||
|
||||
$bodyClass = 'body-100';
|
||||
@@ -25,7 +25,7 @@ include 'header.php';
|
||||
</p>
|
||||
<p class="submit">
|
||||
<button type="submit" class="btn btn-l w-100 primary"><?php _e('登录'); ?></button>
|
||||
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer')); ?>" />
|
||||
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer') ?? ''); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="remember">
|
||||
|
||||
Reference in New Issue
Block a user