fix: add global scope declaration for $register in registers.php

PHPUnit's FileLoader::load() includes bootstrap files inside a function
scope. Without the global declaration, $register is created in local
scope and isn't accessible when other files (like resources.php) use
global $register to reference it.
This commit is contained in:
Chirag Aggarwal
2026-02-04 16:05:13 +05:30
parent 720ceabbbc
commit a744cb0843
+1
View File
@@ -31,6 +31,7 @@ use Utopia\Queue;
use Utopia\Registry\Registry;
use Utopia\System\System;
global $register;
$register = new Registry();
Http::setMode(System::getEnv('_APP_ENV', Http::MODE_TYPE_PRODUCTION));