From 584981a53ec5c0d1a5b6cf3d4d3f0f374ca6df3f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Fri, 29 Apr 2011 23:41:29 +0300 Subject: more graceful handling of invalid SN, more complete usage example --- gsxlib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gsxlib.php') diff --git a/gsxlib.php b/gsxlib.php index 60a3fc0..c51639c 100644 --- a/gsxlib.php +++ b/gsxlib.php @@ -95,7 +95,13 @@ class GsxLib 'unitDetail' => array('serialNumber' => $serialNumber) )); - $result = $this->client->WarrantyStatus($a); + try { + $result = $this->client->WarrantyStatus($a); + } catch (SoapFault $e) { + trigger_error($e->getMessage()); + return FALSE; + } + return $result->WarrantyStatusResponse->warrantyDetailInfo; } -- cgit v1.2.3