Skip to content

Commit

Permalink
Merge branch 'release-3.0' into db_schema
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <[email protected]>
  • Loading branch information
Sesquipedalian committed Feb 29, 2024
2 parents 01430b9 + d594310 commit 632f23c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Sources/Subs-Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -5158,7 +5158,7 @@ function loadJavaScriptFile(string $fileName, array $params = [], string $id = '
SMF\Theme::loadJavaScriptFile($fileName, $params, $id);
}

function addJavaScriptVar(string $key, string $value, bool $escape = false)
function addJavaScriptVar(string $key, mixed $value, bool $escape = false)
{
return SMF\Theme::addJavaScriptVar($key, $value, $escape);
}
Expand Down
4 changes: 2 additions & 2 deletions Sources/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,10 @@ public static function loadJavaScriptFile(string $fileName, array $params = [],
* This is cleaner and easier for modders than Theme::addInlineJavaScript().
*
* @param string $key The key for this variable
* @param string $value The value
* @param mixed $value The value
* @param bool $escape Whether or not to escape the value
*/
public static function addJavaScriptVar(string $key, string $value, bool $escape = false): void
public static function addJavaScriptVar(string $key, mixed $value, bool $escape = false): void
{
// Variable name must be a valid string.
if (!is_string($key) || $key === '' || is_numeric($key)) {
Expand Down
6 changes: 3 additions & 3 deletions Sources/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,12 @@ public function isWebsite(): bool
/**
* Check if this URL uses one of the specified schemes.
*
* @param string|string[] $schema Schemes to check.
* @param string|string[] $scheme Schemes to check.
* @return bool Whether the URL matches a scheme.
*/
public function isSchema(string|array $scheme): bool
public function isScheme(string|array $scheme): bool
{
return !empty($this->scheme) && in_array($this->scheme, array_map('strval', (array) $schema));
return !empty($this->scheme) && in_array($this->scheme, array_map('strval', (array) $scheme));
}

/**
Expand Down

0 comments on commit 632f23c

Please sign in to comment.