This commit is contained in:
Huong Nguyen
2023-08-24 10:38:13 +07:00
2 changed files with 40 additions and 1 deletions
+4 -1
View File
@@ -2067,9 +2067,12 @@ function get_mimetype_description($obj, $capitalise=false) {
*/
function file_get_typegroup($element, $groups) {
static $cached = array();
// Turn groups into a list.
if (!is_array($groups)) {
$groups = array($groups);
$groups = preg_split('/[\s,;:"\']+/', $groups, -1, PREG_SPLIT_NO_EMPTY);
}
if (!array_key_exists($element, $cached)) {
$cached[$element] = array();
}