From 83475a1284714e083cdd4016489af7da7d820c0e Mon Sep 17 00:00:00 2001 From: Adam Bisek Date: Fri, 20 Sep 2013 12:16:26 +0200 Subject: [PATCH] Fixed non-existent property "code" in response object (on failure) .. --- S3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S3.php b/S3.php index 70e305e4..e922135f 100644 --- a/S3.php +++ b/S3.php @@ -431,7 +431,7 @@ public static function getBucket($bucket, $prefix = null, $marker = null, $maxKe $rest->setParameter('marker', $nextMarker); if ($delimiter !== null && $delimiter !== '') $rest->setParameter('delimiter', $delimiter); - if (($response = $rest->getResponse()) == false || $response->code !== 200) break; + if (($response = $rest->getResponse()) == false || (isset($response->error) && isset($response->error->code))) break; if (isset($response->body, $response->body->Contents)) foreach ($response->body->Contents as $c)