mirror of
https://github.com/php/web-pecl.git
synced 2026-03-23 23:02:08 +01:00
Add another error instead of showing a 500
This commit is contained in:
@@ -249,7 +249,15 @@ class Release
|
||||
$id = $old ? $old['id'] : 0;
|
||||
$release_id = (!$id) ? 1 : $id + 1;
|
||||
|
||||
$statement = $this->database->run($sql, [$release_id, $package_id, $version, $state, $this->authUser->handle, $relnotes]);
|
||||
try {
|
||||
$statement = $this->database->run($sql, [$release_id, $package_id, $version, $state, $this->authUser->handle, $relnotes]);
|
||||
} catch (\PDOException $e) {
|
||||
@unlink($file);
|
||||
|
||||
$res = PEAR::raiseError('Could not insert file information: '. $e->getMessage());
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
// Update files table
|
||||
$sql = "INSERT INTO files
|
||||
|
||||
Reference in New Issue
Block a user