|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-21 23:03 UTC] iekpo@php.net
[2014-02-13 18:31 UTC] omars@php.net
-Assigned To: iekpo
+Assigned To: omars
[2014-02-13 20:28 UTC] omars@php.net
-Status: Assigned
+Status: Wont fix
[2014-02-13 20:28 UTC] omars@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
Description: ------------ It seems that the float to string conversion is not working correctly for SolrInputDocument::setBoost() when the PHP locale contains the rule, that the delimiter is something else than a dot. The value will be written with the formatting defined by the locale in the XML file, which leads to a 500 error on Solr server side. Reproduce code: --------------- // With German PHP locale setlocale(LC_ALL, 'de_DE'); echo (string) 1.5; // will output 1,5 // and $doc = new SolrInputDocument(); $doc->setBoost(2.5); ... results in the following XML: <doc boost="2,5"> <field name="id">177683</field> and Solr responds: HTTP/1.1 500 Internal Server Error Server: Apache-Coyote/1.1 ... HTTP Status 500 - For input string: "2,5" Expected result: ---------------- <doc boost="2.5"> Actual result: -------------- <doc boost="2,5">