Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define $options as an array if its not already an array - the code is expecting an array. #15641

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions libraries/cms/html/html.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ public static function stylesheet($file, $options = array(), $attribs = array())
}
else
{
if (!is_array($options))
{
$options = array();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding stylewise, I think you need to add a return after }.

$options['relative'] = isset($options['relative']) ? $options['relative'] : false;
$options['pathOnly'] = isset($options['pathOnly']) ? $options['pathOnly'] : false;
$options['detectBrowser'] = isset($options['detectBrowser']) ? $options['detectBrowser'] : true;
Expand Down