1
0
Fork 0
mirror of synced 2024-07-01 20:50:49 +12:00

Add comments

This commit is contained in:
Matej Bačo 2024-05-24 13:04:30 +02:00
parent 074b807d8d
commit 8dd883a312
2 changed files with 3 additions and 0 deletions

View file

@ -279,6 +279,8 @@ App::post('/v1/projects')
}
}
// Hook allowing instant project mirroring during migration
// Outside of migration, hook is not registered and has no effect
$hooks->trigger('afterProjectCreation', [ $project, $pools, $cache ]);
$response

View file

@ -307,6 +307,7 @@ class Exception extends \Exception
$this->type = $type;
$this->code = $code ?? $this->errors[$type]['code'];
// Mark string errors like HY001 from PDO as 500 errors
if(\is_string($this->code)) {
if (\is_numeric($this->code)) {
$this->code = (int) $this->code;