From ea9f4695139c6f2be431c721ae00d9c9ebc137e3 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Tue, 26 Sep 2023 20:34:30 +0900 Subject: [PATCH] Convert potentially problematic parameters to string before passing from legacy function to Rhymix Framework --- common/legacy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/legacy.php b/common/legacy.php index b2981dd27..63807df53 100644 --- a/common/legacy.php +++ b/common/legacy.php @@ -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 = '
' . '

' . lang('security_warning_embed') . '

'; - $content = Rhymix\Framework\Filters\MediaFilter::removeEmbeddedMedia($content, $security_msg); + $content = Rhymix\Framework\Filters\MediaFilter::removeEmbeddedMedia((string)$content, $security_msg); } return;