From 80623580f24eaeab060b7ec9fcdfe792b2983a09 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 23 May 2021 02:55:27 +0200 Subject: [PATCH] Fix creating account if $npcCheck is enabled --- system/libs/DataLoader.php | 2 +- system/libs/validator.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/libs/DataLoader.php b/system/libs/DataLoader.php index 4ca934e4..66b4ed27 100644 --- a/system/libs/DataLoader.php +++ b/system/libs/DataLoader.php @@ -63,7 +63,7 @@ class DataLoader self::$startTime = microtime(true); - require LIBS . 'npc.php'; + require_once LIBS . 'npc.php'; if(NPCs::loadFromXML()) { success(self::$locale['step_database_loaded_npcs'] . self::getLoadedTime()); } diff --git a/system/libs/validator.php b/system/libs/validator.php index 450c2573..c69f0039 100644 --- a/system/libs/validator.php +++ b/system/libs/validator.php @@ -223,7 +223,7 @@ class Validator $npcCheck = config('character_name_npc_check'); if ($npcCheck) { - require LIBS . 'npc.php'; + require_once LIBS . 'npc.php'; NPCS::load(); if(NPCS::$npcs && in_array(strtolower($name), NPCS::$npcs)) { self::$lastError = "Invalid name format. Do not use NPC Names"; @@ -346,7 +346,7 @@ class Validator $npcCheck = config('character_name_npc_check'); if ($npcCheck) { - require LIBS . 'npc.php'; + require_once LIBS . 'npc.php'; NPCS::load(); if(NPCS::$npcs && in_array($name_lower, NPCS::$npcs)) { self::$lastError = "Invalid name format. Do not use NPC Names";