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:
@@ -34,7 +34,7 @@ include 'menu.php';
|
||||
if ($page->have()) {
|
||||
$permalink = str_replace('{cid}', $page->cid, $permalink);
|
||||
}
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($page->slug) . '" class="mono" />';
|
||||
$input = '<input type="text" id="slug" name="slug" autocomplete="off" value="' . htmlspecialchars($page->slug ?? '') . '" class="mono" />';
|
||||
?>
|
||||
<p class="mono url-slug">
|
||||
<label for="slug" class="sr-only"><?php _e('网址缩略名'); ?></label>
|
||||
@@ -43,7 +43,7 @@ include 'menu.php';
|
||||
<p>
|
||||
<label for="text" class="sr-only"><?php _e('页面内容'); ?></label>
|
||||
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text"
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($page->text); ?></textarea>
|
||||
name="text" class="w-100 mono"><?php echo htmlspecialchars($page->text ?? ''); ?></textarea>
|
||||
</p>
|
||||
|
||||
<?php include 'custom-fields.php'; ?>
|
||||
|
||||
Reference in New Issue
Block a user