mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
Fix fatal error when some important variables contain non-scalar values
This commit is contained in:
parent
7fce9fcc39
commit
83a42081fa
2 changed files with 7 additions and 7 deletions
|
|
@ -105,7 +105,7 @@ class HTMLDisplayHandler
|
||||||
'dispPageAdminMobileContentModify' => true,
|
'dispPageAdminMobileContentModify' => true,
|
||||||
'dispPageAdminMobileContent' => true,
|
'dispPageAdminMobileContent' => true,
|
||||||
);
|
);
|
||||||
$current_act = Context::get('act') ?? '';
|
$current_act = strval(Context::get('act'));
|
||||||
if(Context::get('module') != 'admin' && strpos($current_act, 'Admin') !== false && !isset($x_exclude_actions[$current_act]))
|
if(Context::get('module') != 'admin' && strpos($current_act, 'Admin') !== false && !isset($x_exclude_actions[$current_act]))
|
||||||
{
|
{
|
||||||
$output = '<div class="x">' . $output . '</div>';
|
$output = '<div class="x">' . $output . '</div>';
|
||||||
|
|
|
||||||
|
|
@ -88,11 +88,11 @@ class ModuleHandler extends Handler
|
||||||
|
|
||||||
// Set variables from request arguments
|
// Set variables from request arguments
|
||||||
$this->method = Context::getRequestMethod();
|
$this->method = Context::getRequestMethod();
|
||||||
$this->module = $module ? $module : Context::get('module');
|
$this->module = strval($module ?: Context::get('module'));
|
||||||
$this->act = $act ? $act : Context::get('act');
|
$this->act = strval($act ?: Context::get('act'));
|
||||||
$this->mid = $mid ? $mid : Context::get('mid');
|
$this->mid = strval($mid ?: Context::get('mid'));
|
||||||
$this->document_srl = $document_srl ? (int) $document_srl : (int) Context::get('document_srl');
|
$this->document_srl = intval($document_srl ?: Context::get('document_srl'));
|
||||||
$this->module_srl = $module_srl ? (int) $module_srl : (int) Context::get('module_srl');
|
$this->module_srl = intval($module_srl ?: Context::get('module_srl'));
|
||||||
$this->route = Context::getCurrentRequest() ?: new stdClass;
|
$this->route = Context::getCurrentRequest() ?: new stdClass;
|
||||||
$this->is_mobile = Mobile::isFromMobilePhone();
|
$this->is_mobile = Mobile::isFromMobilePhone();
|
||||||
if($entry = Context::get('entry'))
|
if($entry = Context::get('entry'))
|
||||||
|
|
@ -156,7 +156,7 @@ class ModuleHandler extends Handler
|
||||||
$urls = array('success_return_url', 'error_return_url');
|
$urls = array('success_return_url', 'error_return_url');
|
||||||
foreach($urls as $key)
|
foreach($urls as $key)
|
||||||
{
|
{
|
||||||
$url = Context::get($key);
|
$url = strval(Context::get($key));
|
||||||
if ($url && !Rhymix\Framework\URL::isInternalURL($url))
|
if ($url && !Rhymix\Framework\URL::isInternalURL($url))
|
||||||
{
|
{
|
||||||
Context::set($key, null);
|
Context::set($key, null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue