mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Convert potentially problematic parameters to string before passing from legacy function to Rhymix Framework
This commit is contained in:
parent
9ca2c94fe4
commit
ea9f469513
1 changed files with 3 additions and 3 deletions
|
|
@ -492,7 +492,7 @@ function cut_str($string, $cut_size = 0, $tail = '...'): string
|
|||
*/
|
||||
function get_time_zone_offset($timezone): int
|
||||
{
|
||||
return Rhymix\Framework\DateTime::getTimezoneOffsetByLegacyFormat($timezone);
|
||||
return Rhymix\Framework\DateTime::getTimezoneOffsetByLegacyFormat((string)$timezone);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -638,7 +638,7 @@ function zdate($str, $format = 'Y-m-d H:i:s', $conversion = false): ?string
|
|||
}
|
||||
|
||||
// get unixtime by using ztime() for date() function's argument.
|
||||
$result = Rhymix\Framework\DateTime::formatTimestampForCurrentUser($format, ztime($str));
|
||||
$result = Rhymix\Framework\DateTime::formatTimestampForCurrentUser((string)$format, ztime($str));
|
||||
|
||||
// change day and am/pm for each language
|
||||
if(preg_match('/[MFAa]/', $format))
|
||||
|
|
@ -892,7 +892,7 @@ function stripEmbedTagForAdmin(&$content, $writer_member_srl): void
|
|||
|
||||
$security_msg = '<div style="border: 1px solid #DDD; background: #FAFAFA; text-align:center; margin: 1em 0;">' .
|
||||
'<p style="margin: 1em;">' . lang('security_warning_embed') . '</p></div>';
|
||||
$content = Rhymix\Framework\Filters\MediaFilter::removeEmbeddedMedia($content, $security_msg);
|
||||
$content = Rhymix\Framework\Filters\MediaFilter::removeEmbeddedMedia((string)$content, $security_msg);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue