SELECT IF(lang.`region_id` IS NULL OR lang.`region_id` = '', global.`region_id`, lang.`region_id`) AS `region_id`, IF(lang.`title` IS NULL OR lang.`title` = '', global.`title`, lang.`title`) AS `title`, IF(lang.`description` IS NULL OR lang.`description` = '', global.`description`, lang.`description`) AS `description`, IF(lang.`file` IS NULL OR lang.`file` = '', global.`file`, lang.`file`) AS `file`, IF(lang.`extension` IS NULL OR lang.`extension` = '', global.`extension`, lang.`extension`) AS `extension`, IF(lang.`enabled` IS NULL OR lang.`enabled` = '', global.`enabled`, lang.`enabled`) AS `enabled`, IF(lang.`version` IS NULL OR lang.`version` = '', global.`version`, lang.`version`) AS `version`, IF(category_lang.`region_id` IS NULL OR category_lang.`region_id` = '', category_global.`region_id`, category_lang.`region_id`) AS `category_region_id`, IF(category_lang.`title` IS NULL OR category_lang.`title` = '', category_global.`title`, category_lang.`title`) AS `category_title`, IF(category_lang.`description` IS NULL OR category_lang.`description` = '', category_global.`description`, category_lang.`description`) AS `category_description`, IF(category_lang.`dividers` IS NULL OR category_lang.`dividers` = '', category_global.`dividers`, category_lang.`dividers`) AS `category_dividers`, `file`.`id` AS `id`, `file`.`category_id` AS `category_id`, `file`.`subtype` AS `subtype`, `file`.`state` AS `state`, `file`.`access` AS `access`, `file`.`ordering` AS `ordering`, `file`.`created` AS `created`, `file`.`created_by` AS `created_by`, `file`.`modified` AS `modified`, `file`.`modified_by` AS `modified_by`, `file`.`hits` AS `hits`, `file`.`params` AS `params`, `category`.`id` AS `category_id`, `category`.`parent_id` AS `category_parent_id`, `category`.`region_category_id` AS `category_region_category_id`, `category`.`lft` AS `category_lft`, `category`.`rgt` AS `category_rgt`, `category`.`level` AS `category_level`, `category`.`path` AS `category_path`, `category`.`type` AS `category_type`, `category`.`alias` AS `category_alias`, `category`.`background` AS `category_background`, `category`.`image` AS `category_image`, `category`.`ordering` AS `category_ordering`, `category`.`state` AS `category_state`, `category`.`authority` AS `category_authority`, `category`.`access` AS `category_access`, `category`.`pin_to_top` AS `category_pin_to_top`, `category`.`created` AS `category_created`, `category`.`created_by` AS `category_created_by`, `category`.`modified` AS `category_modified`, `category`.`modified_by` AS `category_modified_by`, `category`.`params` AS `category_params`, `category`.`hide` AS `category_hide` FROM `files` AS `file` LEFT JOIN `categories` AS `category` ON `file`.`category_id` = `category`.`id` LEFT JOIN (SELECT `lang`.* FROM `file_langs` AS `lang` LEFT JOIN `regions` AS `region` ON `region`.`id` = `lang`.`region_id` WHERE `region`.`id` = 9) AS `lang` ON `lang`.`file_id` = `file`.`id` LEFT JOIN (SELECT `lang`.* FROM `file_langs` AS `lang` LEFT JOIN `regions` AS `region` ON `region`.`id` = `lang`.`region_id` WHERE `region`.`is_default` = 1) AS `global` ON `global`.`file_id` = `file`.`id` LEFT JOIN (SELECT `category_lang`.* FROM `category_langs` AS `category_lang` LEFT JOIN `regions` AS `category_region` ON `category_region`.`id` = `category_lang`.`region_id` WHERE `category_region`.`id` = 9) AS `category_lang` ON `category_lang`.`category_id` = `category`.`id` LEFT JOIN (SELECT `category_lang`.* FROM `category_langs` AS `category_lang` LEFT JOIN `regions` AS `category_region` ON `category_region`.`id` = `category_lang`.`region_id` WHERE `category_region`.`is_default` = 1) AS `category_global` ON `category_global`.`category_id` = `category`.`id` WHERE JSON_LENGTH(file.access) = 0App\Services\LocaleService::getCurrentRegion(): Return value must be of type App\Entity\Region, null returned