Skip to content

Commit

Permalink
phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
bolechen committed Feb 26, 2019
1 parent 43c8945 commit 4513f88
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Push.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public function parse($postRaw = null)
}

parse_str($postRaw, $data);
if (!is_array($data)) {
throw new \Exception('数据不正确');
}

$this->checkSign($data);

return $data;
Expand All @@ -48,7 +52,7 @@ public function checkSign(array $data)
{
$sign = $this->signature($data);

if ($sign != $data['sign']) {
if (!isset($data['sign']) || $sign != $data['sign']) {
throw new \Exception('签名不正确');
}
}
Expand Down

0 comments on commit 4513f88

Please sign in to comment.