mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
allow null adapter
This commit is contained in:
parent
9d99f5cec2
commit
85da691aec
1 changed files with 5 additions and 3 deletions
|
|
@ -1390,10 +1390,12 @@ class Builds extends Action
|
||||||
* @param Realtime $queueForRealtime
|
* @param Realtime $queueForRealtime
|
||||||
* @param Database $dbForProject
|
* @param Database $dbForProject
|
||||||
* @param Document $deployment
|
* @param Document $deployment
|
||||||
|
* @param array $runtime
|
||||||
|
* @param string|null $adapter
|
||||||
* @return void
|
* @return void
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, string $adapter): void
|
protected function afterBuildSuccess(Realtime $queueForRealtime, Database $dbForProject, Document &$deployment, array $runtime, ?string $adapter): void
|
||||||
{
|
{
|
||||||
if (!($queueForRealtime instanceof Realtime)) {
|
if (!($queueForRealtime instanceof Realtime)) {
|
||||||
throw new Exception('queueForRealtime must be an instance of Realtime');
|
throw new Exception('queueForRealtime must be an instance of Realtime');
|
||||||
|
|
@ -1407,8 +1409,8 @@ class Builds extends Action
|
||||||
if (!is_array($runtime)) {
|
if (!is_array($runtime)) {
|
||||||
throw new Exception('runtime must be an array');
|
throw new Exception('runtime must be an array');
|
||||||
}
|
}
|
||||||
if (!is_string($adapter)) {
|
if (!is_string($adapter) && !is_null($adapter)) {
|
||||||
throw new Exception('adapter must be a string');
|
throw new Exception('adapter must be a string or null');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue