1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

Connection problem

This commit is contained in:
fogelito 2023-12-14 18:17:19 +02:00
parent cc5ae73f57
commit 4ce312560b
3 changed files with 3 additions and 6 deletions

View file

@ -163,7 +163,7 @@ App::post('/v1/account')
]);
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $existingTarget]);
}
$dbForProject->delete('users', $user->getId());
$dbForProject->delete('users', $user->getId()); // todo: What id going on here>
} catch (Duplicate) {
throw new Exception(Exception::USER_ALREADY_EXISTS);
}

View file

@ -798,7 +798,7 @@ $register->set('pools', function () {
PDO::ATTR_TIMEOUT => 3, // Seconds
PDO::ATTR_PERSISTENT => true,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_ERRMODE => App::isDevelopment() ? PDO::ERRMODE_WARNING : PDO::ERRMODE_SILENT, // If in production mode, warnings are not displayed
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT, // Overwrite in PDOProxy
PDO::ATTR_EMULATE_PREPARES => true,
PDO::ATTR_STRINGIFY_FETCHES => true
));
@ -820,12 +820,10 @@ $register->set('pools', function () {
default:
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Invalid scheme");
break;
}
$pool = new Pool($name, $poolSize, function () use ($type, $resource, $dsn) {
// Get Adapter
$adapter = null;
switch ($type) {
case 'database':
$adapter = match ($dsn->getScheme()) {
@ -854,7 +852,6 @@ $register->set('pools', function () {
default:
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Server error: Missing adapter implementation.");
break;
}
return $adapter;

View file

@ -6,7 +6,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
stopOnFailure="true"
>
<extensions>
<extension class="Appwrite\Tests\TestHook" />