com web/qa: This is an object, no array: pulls/api.php

From: Date: Wed, 08 May 2013 09:45:53 +0000
Subject: com web/qa: This is an object, no array: pulls/api.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-66864@lists.php.net to get a copy of this message
Commit: bfc6f84bc6efbf1e44f47879bffe6f19472ddb87 Author: Johannes Schlüter <johannes@schlueters.de> Wed, 8 May 2013 11:45:53 +0200 Parents: ba8818420ba2a1be12601459f59ba9eddfaa9667 Branches: master Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=bfc6f84bc6efbf1e44f47879bffe6f19472ddb87 Log: This is an object, no array Changed paths: M pulls/api.php Diff: diff --git a/pulls/api.php b/pulls/api.php index e1d72cd..c7e0a67 100644 --- a/pulls/api.php +++ b/pulls/api.php @@ -183,7 +183,7 @@ function ghupdate() )); $pull_raw = @file_get_contents($url, false, $ctxt); $pull = $pull_raw ? json_decode($pull_raw) : false; - if (!$pull || empty($pull['state'])) { + if (!is_object($pull) || empty($pull->state)) { header('HTTP/1.0 400 Bad Request'); if (isset($_SESSION['debug']['requests'])) { $_SESSION['debug']['requests'][] = array(

« previous php.qa (#66864) next »