php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60055 SolrClient::Ping throws both E_ERROR and SolrClientException
Submitted: 2011-10-13 15:45 UTC Modified: 2015-01-11 22:05 UTC
From: gcontreras at digbang dot com Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gcontreras at digbang dot com
New email:
PHP Version: OS:

 

 [2011-10-13 15:45 UTC] gcontreras at digbang dot com
Description:
------------
---
From manual page: http://www.php.net/solrclient.ping#refsect1-solrclient.ping-returnvalues
---

The SolrClient::Ping function will throw a E_ERROR if the client can't connect to the Solr Server. If this error is handled, the function will throw the SolrClientException as documented.

May also refer to: https://bugs.php.net/bug.php?id=59511

Test script:
---------------
$options = array(
...
);

$solr = new SolrClient($options);
$solr->ping(); //Will throw E_ERROR

set_error_handler(...);
$solr->ping(); //Will throw SolrClientException



Expected result:
----------------
I believe the ping function shouldn't throw a E_ERROR, as it complicates code where an application is not dependant on Solr.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-27 01:05 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2014-06-29 15:22 UTC] omars@php.net
fixed
 [2015-01-11 22:05 UTC] omars@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 20:01:31 2024 UTC