瀏覽代碼

Ensure sanitizeHTML gets a string (#2351)

Regression triggered by https://github.com/FreshRSS/FreshRSS/pull/2228
Alexandre Alapetite 7 年之前
父節點
當前提交
912480fab8
共有 1 個文件被更改,包括 3 次插入0 次删除
  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();