Skip to content

Commit

Permalink
修复了未设置notification与message时会导致参数检测警告的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiezefan committed Jan 5, 2016
1 parent 57040fc commit 5949dbd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/JPush/core/PushPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ public function build() {
if (count($this->message) > 0) {
$payload['message'] = $this->message;
}

if (is_null($payload['notification']) && is_null($payload['message'])) {
if (!array_key_exists('notification', $payload) && !array_key_exists('message', $payload)) {
throw new InvalidArgumentException('notification and message can not all be null');
}

Expand Down

0 comments on commit 5949dbd

Please sign in to comment.