|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-10-16 19:33 UTC] jochen dot weber80 at gmail dot com
[2019-03-29 09:36 UTC] omars@php.net
-Assigned To:
+Assigned To: omars
[2020-06-28 08:17 UTC] omars@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 03:00:02 2025 UTC |
Description: ------------ If json_last_error() returns an error state, calling getResponse() causes a segfault. Clearing json_last_error() by performing a successful json_decode or json_encode prevents the segfault. I'm on solr 2.4.0 and PHP Version 7.0.15-0ubuntu0.16.04.4, the latest package from Ubuntu 16 LTS. Test script: --------------- <?php json_decode("", true); // uncommnt below to prevent segfault // json_decode("[1]"); $client = new SolrClient(array('hostname' => 'myhost', 'port' => 'myport', 'path' => 'mypath', 'wt' => 'json')); $query = new SolrQuery(); $query->setQuery('*:*'); $response = $client->query($query); // results in segfault $results = $response->getResponse(); Expected result: ---------------- segfault