Skip to content
This repository has been archived by the owner on Feb 23, 2019. It is now read-only.

Validate needle passed to stristr function #558

Merged
merged 2 commits into from
Feb 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Minify/Minify/IgnoredCommentPreserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected function _callback($match) {

protected function _isIgnoredComment(&$comment) {
foreach ($this->_ignoredComments as $ignoredComment) {
if (stristr($comment, $ignoredComment) !== false) {
if (!empty($ignoredComment) && stristr($comment, $ignoredComment) !== false) {
return true;
}
}
Expand Down