|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59094 Crash when trying to access empty field
Submitted: 2010-03-02 09:12 UTC Modified: 2010-03-02 12:08 UTC
From: koenk82 at gmail dot com Assigned:
Status: Closed Package: solr (PECL)
PHP Version: 5.3.1 OS: Windows 7
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: koenk82 at gmail dot com
New email:
PHP Version: OS:


 [2010-03-02 09:12 UTC] koenk82 at gmail dot com
I've used the php_solr.dll file from, which is version 0.9.7.

When doing getResponse() on the SolrQueryResponse object PHP seems to crash when it contains an empty field.

When var_dump'ing the query response the empty field looks like:
<str name="s_full_description"/>

When filling the field, the problem doesn't occur, so the response contains this:
<str name="s_full_description">something</str>

Reproduce code:
// make sure there's a field with no data
$document->addField('s_short_description', '');

// retrieve the field
$options = array( ... );
$client = new SolrClient($options);
$query = new SolrQuery();
$results = $query->setQuery('*:*');
$query->addField('s_full_description'); // when leaving this out, it works correctly
$queryResponse = $client->query($query);
$response = $queryResponse->getResponse(); // makes it crash

Expected result:
not to crash

Actual result:
php stopped working


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-03-02 12:08 UTC]
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

This issue was fixed in release 0.9.8 or SVN revision 291171

Once we get the windows version up to date you should be fine.

I will try to get that in place within the next week or so.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Jan 21 03:03:34 2022 UTC