Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63300 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70504 invoked from network); 9 Oct 2012 11:34:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2012 11:34:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=scope@planetavent.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=scope@planetavent.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain planetavent.de from 89.107.189.172 cause and error) X-PHP-List-Original-Sender: scope@planetavent.de X-Host-Fingerprint: 89.107.189.172 mail.xa8.serverdomain.org Linux 2.6 Received: from [89.107.189.172] ([89.107.189.172:53225] helo=mail.xa8.serverdomain.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 06/87-23861-8CB04705 for ; Tue, 09 Oct 2012 07:34:34 -0400 Received: from mail-pb0-f42.google.com (mail-pb0-f42.google.com [209.85.160.42]) (Authenticated sender: xa8190p1) by mail.xa8.serverdomain.org (mail.xa8.serverdomain.org) with ESMTPSA id D5CCB28ED588F for ; Tue, 9 Oct 2012 13:34:28 +0200 (CEST) Received: by mail-pb0-f42.google.com with SMTP id ro2so5278168pbb.29 for ; Tue, 09 Oct 2012 04:34:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.88.198 with SMTP id bi6mr52071896pab.23.1349782466852; Tue, 09 Oct 2012 04:34:26 -0700 (PDT) Received: by 10.66.220.105 with HTTP; Tue, 9 Oct 2012 04:34:26 -0700 (PDT) Date: Tue, 9 Oct 2012 13:34:26 +0200 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: SoapClient: Catchable Fatal Error for invalid WSDL From: scope@planetavent.de (Nicolai Scheer) Hi! Just read the comments for Bug #47584: WSDL error in soapClient causes Fatal Error. If a SoapClient is created and the WSDL can not be found, an Exception is thrown: 1 ) ); } catch ( Exception $e ) { echo $e->faultstring; } echo "ok\n"; $error = error_get_last(); print_r( $error ); ?> Although I'm using exceptions here, an E_ERROR gets "registered", thus the output is: SOAP-ERROR: Parsing WSDL: Couldn't load from 'non-existent.wsdl' : failed to load external entity "non-existent.wsdl" ok Array ( [type] => 1 [message] => SOAP-ERROR: Parsing WSDL: Couldn't load from 'non-existent.wsdl' : failed to load external entity "non-existent.wsdl" [file] => Y:\client2.phb [line] => 5 ) Can anybody comment on this behaviour? Should an error be registered when exceptions are used? Should this be an E_RECOVERABLE_ERROR instead? The specific problem is that we use a shutdown function that utilizes error_get_last() to see if a fatal error orccured and then tries to redirect to a specific error page. Now we call a php script via ajax that tries to connect to a soap service. If the service is unreachable we correctly catch the exception, but the registered E_ERROR gets processed on shutdown, thus redirecting... Thanks and greetings Nico