Skip to content

Commit 55525e1

Browse files
authored
Merge pull request #25 from codeccoop/feat/addons-tests
zoho addons tests
2 parents d20024a + 8c44e28 commit 55525e1

File tree

6 files changed

+1239
-3
lines changed

6 files changed

+1239
-3
lines changed

forms-bridge/addons/zoho/class-zoho-form-bridge.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,16 @@ function ( $headers, $backend ) {
7070
2
7171
);
7272

73-
$response = $this->backend()->$method(
73+
$backend = $this->backend();
74+
75+
if ( ! $backend ) {
76+
return new WP_Error(
77+
'invalid_backend',
78+
'The bridge does not have a valid backend'
79+
);
80+
}
81+
82+
$response = $backend->$method(
7483
$this->endpoint,
7584
$payload,
7685
array(),

0 commit comments

Comments
 (0)