Commit:    b1aecf8e1944b17de14d52d2e2c9ce989a2a3eaa
Author:    kovacs.ferenc <[email protected]>         Fri, 1 Aug 2014 
16:25:01 +0200
Parents:   17134ef267302ca9605d72ad804259a48366a7d3
Branches:  master

Link:       
http://git.php.net/?p=web/master.git;a=commitdiff;h=b1aecf8e1944b17de14d52d2e2c9ce989a2a3eaa

Log:
duh, swap the lines so $payload is set before used

Changed paths:
  M  github-webhook.php


Diff:
diff --git a/github-webhook.php b/github-webhook.php
index 3d2e77a..b717c1d 100644
--- a/github-webhook.php
+++ b/github-webhook.php
@@ -50,9 +50,9 @@ if (!verify_signature($body)) {
        exit;
 }
 
+$payload = json_decode($body);
 $PR = $payload->pull_request;
 $action = $payload->action;
-$payload = json_decode($body);
 $htmlUrl = $PR->html_url;
 $repoName = $PR->base->repo->name;
 $description = $PR->body;


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to