|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2020-06-28 07:59 UTC] omars@php.net
-Assigned To:
+Assigned To: omars
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 12:00:01 2025 UTC |
Description: ------------ Running the test script while capturing the network traffic or running strace will show a trailing \x00 in the query field specifier sent to the Solr server. This is reproducible on current git master, bisecting points to the following commit: commit b1b44e0a22bcce8f625707248d0b4d3630935359 Author: Omar Shaban <omars@php.net> Date: Fri Nov 4 13:09:15 2016 +0100 Fixes Bug #72740: addQueryField return wrong query Test script: --------------- <?php $client = new \SolrClient(['hostname' => '127.0.0.1', 'port' => 8983, 'path' => '/solr/foo']); $query = new \SolrDisMaxQuery(); $query->setQuery('foo'); $query->addQueryField('foo'); $r = $client->query($query); Expected result: ---------------- POST /solr/foo/select/?version=2.2&indent=on&wt=xml HTTP/1.1 Host: 127.0.0.1:8983 User-Agent: PHP Solr Client 2.4.0 Accept: */* Accept-Encoding: deflate, gzip Accept-Charset: utf-8 Keep-Alive: 300 Connection: keep-alive Content-Type: application/x-www-form-urlencoded;charset=UTF-8 Content-Length: 31 defType=edismax&q=foo&qf=foo Actual result: -------------- POST /solr/foo/select/?version=2.2&indent=on&wt=xml HTTP/1.1 Host: 127.0.0.1:8983 User-Agent: PHP Solr Client 2.4.0 Accept: */* Accept-Encoding: deflate, gzip Accept-Charset: utf-8 Keep-Alive: 300 Connection: keep-alive Content-Type: application/x-www-form-urlencoded;charset=UTF-8 Content-Length: 31 defType=edismax&q=foo&qf=foo%00