Explorar o código

Ensure sanitizeHTML gets a string (#2351)

Regression triggered by https://github.com/FreshRSS/FreshRSS/pull/2228
Alexandre Alapetite %!s(int64=7) %!d(string=hai) anos
pai
achega
912480fab8
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      lib/lib_rss.php

+ 3 - 0
lib/lib_rss.php

@@ -280,6 +280,9 @@ function customSimplePie($attributes = array()) {
 }
 
 function sanitizeHTML($data, $base = '') {
+	if (!is_string($data)) {
+		return '';
+	}
 	static $simplePie = null;
 	if ($simplePie == null) {
 		$simplePie = customSimplePie();