PHP 5.3 backward compatibility

This commit is contained in:
danpros 2023-11-27 16:10:50 +07:00
commit 3278f6e799
2 changed files with 18 additions and 4 deletions

View file

@ -570,8 +570,14 @@ function get_category_info($category)
}
}
if (strtolower($category ?? '') == 'uncategorized') {
return default_category();
if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION < 7) {
if (strtolower($category) == 'uncategorized') {
return default_category();
}
} else {
if (strtolower($category ?? '') == 'uncategorized') {
return default_category();
}
}
return $tmp;