Skip to content

Commit

Permalink
Cast $script and $id as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
kktsvetkov committed Nov 22, 2018
1 parent 4177d5b commit 9b0853d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/JS.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ public static function file($script, $id = '', array $extra = array(), $stack =
$extra += array(
'type' => 'text/javascript',
);
$extra['src'] = $script;
$extra['src'] = (string) $script;

if (empty($id))
{
$id = $script;
$id = (string) $script;
} else
{
$id = (string) $id;
}

return Stack::add(
Expand Down

0 comments on commit 9b0853d

Please sign in to comment.