Skip to content

Commit f2f2fb2

Browse files
nilsteampassnetnilsteampassnet
nilsteampassnet
authored and
nilsteampassnet
committed
2.1.27
Small fix to ensure compliance with PHP versions below to 7
1 parent 0b8a08c commit f2f2fb2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

install/upgrade_run_2.1.27.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ function columnExists($tablename, $column)
209209
// Change name of field
210210
mysqli_query($db_link, "ALTER TABLE `".$pre."misc` CHANGE `id` `increment_id` INT(12) NOT NULL AUTO_INCREMENT");
211211
} elseif ($res === false) {
212-
echo '[{"finish":"1", "msg":"", "error":"An error appears when adding increment_id user_ip to table misc! '.mysqli_error($db_link).'!"}]';
212+
echo '[{"finish":"1", "msg":"", "error":"An error appears when adding increment_id to table misc! '.mysqli_error($db_link).'!"}]';
213213
mysqli_close($db_link);
214214
exit();
215215
}

sources/main.functions.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ function getFileExtension(string $file)
22272227
* @param string $type What clean to perform
22282228
* @return string
22292229
*/
2230-
function cleanText(string $string, string $type = null)
2230+
function cleanText(string $string, $type = null)
22312231
{
22322232
global $SETTINGS;
22332233

@@ -2238,7 +2238,7 @@ function cleanText(string $string, string $type = null)
22382238
if ($type === "css") {
22392239
// Escape text and quotes in UTF8 format
22402240
return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8');
2241-
} elseif ($type === "html" || empty($type) === true) {
2241+
} elseif (empty($type) === true || is_null($type) === true || $type === "html") {
22422242
// Html cleaner
22432243
return $antiXss->xss_clean($string);
22442244
}

0 commit comments

Comments
 (0)