php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67579 SolrResponse: SolrObject Hydration for json response writer
Submitted: 2014-07-06 17:51 UTC Modified: 2015-01-11 20:48 UTC
From: omars@php.net Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS: Any
Private report: No CVE-ID: None
 [2014-07-06 17:51 UTC] omars@php.net
Description:
------------
Using 'json' response writer currently returns the response of SolrResponse::getResponse() to an array, a SolrObject shall be returned



Test script:
---------------
$options = array (
		'hostname' => SOLR_SERVER_HOSTNAME,
		'login' => SOLR_SERVER_USERNAME,
		'password' => SOLR_SERVER_PASSWORD,
		'port' => SOLR_SERVER_PORT,
		'path' => SOLR_SERVER_PATH,
		'wt' => 'json' 
);

$client = new SolrClient ( $options );
$query = new SolrQuery ( "lucene" );

$response = $client->query ( $query );
var_dump($response->getResponse() instanceof SolrObject);



Expected result:
----------------
bool(true)

Actual result:
--------------
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-07-06 17:51 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2015-01-11 20:48 UTC] omars@php.net
-Status: Assigned +Status: Closed
 [2015-01-11 20:48 UTC] omars@php.net
Resolved on master/version 2.1.0
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Nov 28 21:03:16 2021 UTC