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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Fri Jan 03 03:01:29 2025 UTC