mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Fix miscellaneous errors in PHP 8.0
https://xetown.com/questions/1494606
This commit is contained in:
parent
7e54b3add5
commit
198bb1b079
4 changed files with 14 additions and 6 deletions
|
|
@ -60,7 +60,7 @@ class fileAdminController extends file
|
|||
function procFileAdminInsertUploadConfig()
|
||||
{
|
||||
// Update configuration
|
||||
$config = getModel('module')->getModuleConfig('file');
|
||||
$config = getModel('module')->getModuleConfig('file') ?: new stdClass;
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = Context::get('allowed_filetypes');
|
||||
|
|
@ -126,7 +126,7 @@ class fileAdminController extends file
|
|||
function procFileAdminInsertDownloadConfig()
|
||||
{
|
||||
// Update configuration
|
||||
$config = getModel('module')->getModuleConfig('file');
|
||||
$config = getModel('module')->getModuleConfig('file') ?: new stdClass;
|
||||
$config->allow_outlink = Context::get('allow_outlink') === 'N' ? 'N' : 'Y';
|
||||
$config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
|
@ -148,7 +148,7 @@ class fileAdminController extends file
|
|||
function procFileAdminInsertOtherConfig()
|
||||
{
|
||||
// Update configuration
|
||||
$config = getModel('module')->getModuleConfig('file');
|
||||
$config = getModel('module')->getModuleConfig('file') ?: new stdClass;
|
||||
$config->save_changelog = Context::get('save_changelog') === 'Y' ? 'Y' : 'N';
|
||||
|
||||
// Save and redirect
|
||||
|
|
|
|||
|
|
@ -1323,7 +1323,7 @@ class menuAdminController extends menu
|
|||
$target->node = $srl;
|
||||
$target->child= array();
|
||||
|
||||
while(count($this->map[$srl]))
|
||||
while(count($this->map[$srl] ?? []))
|
||||
{
|
||||
$this->_setParent($srl, array_shift($this->map[$srl]), $target);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class rssAdminController extends rss
|
|||
}
|
||||
else
|
||||
{
|
||||
$target_module_srls = array_keys($vars->open_rss);
|
||||
$target_module_srls = array_keys($vars->open_rss ?: []);
|
||||
}
|
||||
|
||||
if(!count($target_module_srls))
|
||||
|
|
@ -117,7 +117,7 @@ class rssAdminController extends rss
|
|||
}
|
||||
else
|
||||
{
|
||||
$config->open_rss = $vars->open_rss;
|
||||
$config->open_rss = $vars->open_rss ?: [];
|
||||
$config->open_total_feed = $vars->open_total_feed;
|
||||
$config->feed_description = $vars->feed_description;
|
||||
$config->feed_copyright = $vars->feed_copyright;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@ class spamfilterAdminController extends spamfilter
|
|||
|
||||
// Get updated values
|
||||
$vars = Context::getRequestVars();
|
||||
if (!isset($vars->target_devices) || !is_array($vars->target_devices))
|
||||
{
|
||||
$vars->target_devices = [];
|
||||
}
|
||||
if (!isset($vars->target_actions) || !is_array($vars->target_actions))
|
||||
{
|
||||
$vars->target_actions = [];
|
||||
}
|
||||
|
||||
// Check values
|
||||
if (!isset($config->captcha))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue