Skip to content

Commit

Permalink
Merge pull request #8124 from live627/type
Browse files Browse the repository at this point in the history
another type error
  • Loading branch information
live627 authored Feb 29, 2024
2 parents 5009ba2 + d9a95c1 commit d594310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 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

0 comments on commit d594310

Please sign in to comment.