note 104046 modified in class.soapclient by danbrown

From: Date: Thu, 19 May 2011 13:49:50 +0000
Subject: note 104046 modified in class.soapclient by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-179876@lists.php.net to get a copy of this message
Make sure to prefix constructor calls with @ and catch SoapFault exceptions, otherwise you risk having the php interpreter exit/die on simple network issues. Robust sample code by Rasmus from http://bugs.php.net/bug.php?id=47584 <?php try { $x = @new SoapClient("non-existent.wsdl",array("exceptions" => 1)); } catch (SoapFault $E) { echo $E->faultstring; } echo "ok\n"; ?> --was-- Make sure to prefix constructor calls with @ and catch SoapFault exceptions, otherwise you risk having the php interpreter exit/die on simple network issues. Robust sample code by Rasmus from http://bugs.php.net/bug.php?id=47584 <?php try { $x = @new SoapClient("non-existent.wsdl",array("exceptions" => 1)); } catch (SoapFault $E) { echo $E->faultstring; } echo "ok\n"; http://php.net/manual/en/class.soapclient.php

« previous php.notes (#179876) next »