summaryrefslogtreecommitdiff
path: root/includes/util/bitset.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/util/bitset.inc')
-rw-r--r--includes/util/bitset.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/util/bitset.inc b/includes/util/bitset.inc
index 131cb39..14f178c 100644
--- a/includes/util/bitset.inc
+++ b/includes/util/bitset.inc
@@ -11,6 +11,10 @@ function parseMetadata ($metadata) {
$age = (int)date('Y') - $metadata["birth"]["year"] + (strtotime(date('Y') . "-" . $metadata["birth"]["date"]) <= time() ? 0 : -1);
}
+ if (is_string($age) && isset(explode("-", $age)[1]) && is_numeric(explode("-", $age)[1])) {
+ $age = (int)explode("-", $age)[1];
+ }
+
if ($age > 0 && $age <= 10) {
$metadata["little"] = 2;
} else if ($age > 0 && $age <= 15) {