Skip to content

Commit a6e1bf3

Browse files
modified hello to proper use of routing argument
1 parent 25c9474 commit a6e1bf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protocol/V4_1.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class V4_1 extends V4
1818

1919
public function hello(...$args): bool
2020
{
21-
if (count($args) < 4) {
21+
if (count($args) != 5) {
2222
Bolt::error('Wrong arguments count');
2323
return false;
2424
}
@@ -29,7 +29,7 @@ public function hello(...$args): bool
2929
'scheme' => $args[1],
3030
'principal' => $args[2],
3131
'credentials' => $args[3],
32-
'routing' => !empty($args[4]) ? (object)$args[4] : null
32+
'routing' => is_array($args[4]) ? (object)$args[4] : null
3333
]);
3434
} catch (Exception $ex) {
3535
Bolt::error($ex->getMessage());

0 commit comments

Comments
 (0)