Skip to content

Commit

Permalink
modxcms#1035 modxcms#1051 F: Avoid error "strpos(): Empty needle" for…
Browse files Browse the repository at this point in the history
… empty content/templates
  • Loading branch information
Deesen committed Dec 4, 2016
1 parent feb6168 commit 842a844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manager/includes/document.parser.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -4721,7 +4721,7 @@ function removeSanitizeSeed ($string=''){
function cleanUpMODXTags($content='') {
global $sanitize_seed;

if(strpos($sanitize_seed,$content)!==false) $content = str_replace($sanitize_seed, '', $content);
if($content !== '' && strpos($sanitize_seed,$content)!==false) $content = str_replace($sanitize_seed, '', $content);

$enable_filter = $this->config['enable_filter'];
$this->config['enable_filter'] = 1;
Expand Down

2 comments on commit 842a844

@Jako
Copy link

@Jako Jako commented on 842a844 Dec 7, 2016

Choose a reason for hiding this comment

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

Why don't you use the removeSanitizeSeed method in that line?

@Deesen
Copy link
Owner Author

@Deesen Deesen commented on 842a844 Dec 7, 2016

Choose a reason for hiding this comment

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

Seeing no forest because of all the trees I guess, thanks!

Please sign in to comment.