diff --git a/lib/Github/Api/GitData/Trees.php b/lib/Github/Api/GitData/Trees.php index d514d9f8205..939e8619b73 100644 --- a/lib/Github/Api/GitData/Trees.php +++ b/lib/Github/Api/GitData/Trees.php @@ -54,7 +54,7 @@ public function create($username, $repository, array $params) } // If `sha` is not set, `content` is required - if (!isset($tree['sha']) && !isset($tree['content'])) { + if (!array_key_exists('sha', $tree) && !isset($tree['content'])) { throw new MissingArgumentException("tree.$key.content"); } }