php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58875 SolrDocument::current() crashes
Submitted: 2009-10-03 18:13 UTC Modified: 2009-10-04 00:56 UTC
From: felipe@php.net Assigned: iekpo (profile)
Status: Closed Package: solr (PECL)
PHP Version: 5_3 CVS-2009-10-03 (dev) OS:
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: felipe@php.net
New email:
PHP Version: OS:

 

 [2009-10-03 18:13 UTC] felipe@php.net
Description:
------------
See below.

Reproduce code:
---------------
Starting program: /home/felipe/dev/php5/sapi/cli/php -r '$x = new solrdocument; $x->current();'
[Thread debugging using libthread_db enabled]
[New Thread 0xb78ee6d0 (LWP 13018)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb78ee6d0 (LWP 13018)]
0x0826b195 in zim_SolrDocument_current (ht=0, return_value=0x8e2dbfc, return_value_ptr=0x8e5c6d4, this_ptr=0x8e2dc40, return_value_used=0, 
    tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/ext/solr/php_solr_document.c:666
666		solr_create_document_field_object(*field_values, &return_value TSRMLS_CC);
(gdb) bt
#0  0x0826b195 in zim_SolrDocument_current (ht=0, return_value=0x8e2dbfc, return_value_ptr=0x8e5c6d4, this_ptr=0x8e2dc40, 
    return_value_used=0, tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/ext/solr/php_solr_document.c:666
#1  0x0846de89 in zend_do_fcall_common_helper_SPEC (execute_data=0x8e5c61c, tsrm_ls=0x8cc0070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:313
#2  0x0846f050 in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x8e5c61c, tsrm_ls=0x8cc0070)
    at /home/felipe/dev/php5/Zend/zend_vm_execute.h:418
#3  0x0846cb6e in execute (op_array=0x8e2e284, tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/Zend/zend_vm_execute.h:104
#4  0x0842c095 in zend_eval_stringl (str=0xbfe507f7 "$x = new solrdocument; $x->current();", str_len=37, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1167
#5  0x0842c344 in zend_eval_stringl_ex (str=0xbfe507f7 "$x = new solrdocument; $x->current();", str_len=37, retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1209
#6  0x0842c3f8 in zend_eval_string_ex (str=0xbfe507f7 "$x = new solrdocument; $x->current();", retval_ptr=0x0, 
    string_name=0x87e1070 "Command line code", handle_exceptions=1, tsrm_ls=0x8cc0070) at /home/felipe/dev/php5/Zend/zend_execute_API.c:1220
#7  0x0851e773 in main (argc=3, argv=0xbfe4ece4) at /home/felipe/dev/php5/sapi/cli/php_cli.c:1229



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-03 19:27 UTC] israelekpo at gmail dot com
I am currently working on this.
 [2009-10-04 00:56 UTC] israelekpo at gmail dot com
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

SolrDocument::current() no longer gives a fatal error if the SolrDocument is empty.

Fixed in revision 289164.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC