Skip to content

Commit 3eeb8ea

Browse files
authored
Merge pull request #12 from onfleet/vic-onfleet-patch-1
Update Methods.php
2 parents bcbea52 + 88d8e08 commit 3eeb8ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Methods.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static function method(array $methodData, Onfleet $api, ...$args)
7878
if (count($args) >= 1 && in_array($method, ['GET', 'DELETE', 'PUT'])) {
7979
// If the 2nd argument is part of this array, this is a new endpoint
8080
// This covers get(id, params) and insertTask(id, params)
81-
if (in_array($args[1], ['name', 'shortId', 'phone', 'workers', 'organizations', 'teams'])) {
81+
if (isset($args[1]) && in_array($args[1], ['name', 'shortId', 'phone', 'workers', 'organizations', 'teams'])) {
8282
$url = self::replaceWithEndpointAndParam($url, $args[1], $args[0]);
8383
// If the 1st argument is a base 64 encoded ID, replaces URL path with ID
8484
// This covers get(id), update(id), and deleteOne(id)

0 commit comments

Comments
 (0)