1--TEST--
2Solr Bug #67394 - Unable to parse response with NaN
3--FILE--
4<?php
5require_once 'tests/test.config.inc';
6
7$fixture = file_get_contents(ROOT_DIRECTORY . '/files/bug67394.json');
8
9$response = SolrUtils::digestJsonResponse($fixture);
10
11// json spec: does not conform to NaN
12var_dump($response->stats->stats_fields->date->stddev);
13
14$xmlFixture = file_get_contents(ROOT_DIRECTORY . '/files/bug67394.xml');
15if (!json_decode($fixture)) {
16	echo "PHP JSON DECODE failed with: ". json_last_error_msg().PHP_EOL;
17}
18$response = SolrUtils::digestXmlResponse($xmlFixture);
19
20var_dump($response->response->stats->stats_fields->currentPrice->mean);
21?>
22--EXPECTF--
23string(3) "NaN"
24float(NAN)