Merge branch 'rhymix:master' into master

This commit is contained in:
Lastorder 2025-03-10 17:04:17 +09:00 committed by GitHub
commit a40502885e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 259 additions and 140 deletions

View file

@ -556,12 +556,13 @@ class Mail
/**
* Send the email.
*
* @param bool $sync
* @return bool
*/
public function send(): bool
public function send(bool $sync = false): bool
{
// If queue is enabled, send asynchronously.
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
{
Queue::addTask(self::class . '::' . 'sendAsync', $this);
return true;

View file

@ -398,12 +398,13 @@ class Push
/**
* Send the message.
*
* @param bool $sync
* @return bool
*/
public function send(): bool
public function send(bool $sync = false): bool
{
// If queue is enabled, send asynchronously.
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
{
Queue::addTask(self::class . '::' . 'sendAsync', $this);
return true;

View file

@ -626,7 +626,7 @@ class Router
$route = preg_replace_callback('#\\$([a-zA-Z0-9_]+)(:[a-z]+)?#i', function($match) use(&$vars) {
if (isset($vars[$match[1]]))
{
$replacement = urlencode($vars[$match[1]]);
$replacement = urlencode(strval($vars[$match[1]]));
unset($vars[$match[1]]);
return (isset($match[2]) && $match[2] === ':delete') ? '' : $replacement;
}

View file

@ -507,12 +507,13 @@ class SMS
/**
* Send the message.
*
* @param bool $sync
* @return bool
*/
public function send(): bool
public function send(bool $sync = false): bool
{
// If queue is enabled, send asynchronously.
if (config('queue.enabled') && !defined('RXQUEUE_CRON'))
if (!$sync && config('queue.enabled') && !defined('RXQUEUE_CRON'))
{
Queue::addTask(self::class . '::' . 'sendAsync', $this);
return true;

View file

@ -317,11 +317,11 @@ class Security
$check_csrf_token = config('security.check_csrf_token') ? true : false;
if ($token = isset($_SERVER['HTTP_X_CSRF_TOKEN']) ? $_SERVER['HTTP_X_CSRF_TOKEN'] : null)
{
return Session::verifyToken($token, '', $check_csrf_token);
return Session::verifyToken((string)$token, '', $check_csrf_token);
}
elseif ($token = isset($_REQUEST['_rx_csrf_token']) ? $_REQUEST['_rx_csrf_token'] : null)
{
return Session::verifyToken($token, '', $check_csrf_token);
return Session::verifyToken((string)$token, '', $check_csrf_token);
}
elseif ($token = isset($_REQUEST['_fb_adsense_token']) ? $_REQUEST['_fb_adsense_token'] : null)
{