summaryrefslogtreecommitdiffstats
path: root/core/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/functions.php')
-rw-r--r--core/functions.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/functions.php b/core/functions.php
index fc97e3b..ccaf008 100644
--- a/core/functions.php
+++ b/core/functions.php
@@ -351,36 +351,36 @@ function makeSlugURL($string, $separator = '-') {
#===============================================================================
# Function to get data from specific page in templates
#===============================================================================
-function PAGE($id) {
+function PAGE(int $id): array {
try {
$Page = Page\Factory::build($id);
return generatePageItemData($Page);
} catch(Page\Exception $Exception) {
- return NULL;
+ return [];
}
}
#===============================================================================
# Function to get data from specific post in templates
#===============================================================================
-function POST($id) {
+function POST(int $id): array {
try {
$Post = Post\Factory::build($id);
return generatePostItemData($Post);
} catch(Post\Exception $Exception) {
- return NULL;
+ return [];
}
}
#===============================================================================
# Function to get data from specific user in templates
#===============================================================================
-function USER($id) {
+function USER(int $id): array {
try {
$User = User\Factory::build($id);
return generateUserItemData($User);
} catch(User\Exception $Exception) {
- return NULL;
+ return [];
}
}
?> \ No newline at end of file