Conditions | 5 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | public function getResponse() |
||
10 | { |
||
11 | $response = parent::getResponse(); |
||
12 | // workaround for the change in Manticore Search made in 4.2.1, after |
||
13 | // which any query in mode=raw returns an array |
||
14 | if (is_array($response) and count($response) === 1 and isset($response[0]['total'], $response[0]['error'], $response[0]['warning'])) { |
||
15 | foreach ($response[0] as $k=>$v) $response[$k] = $v; |
||
16 | unset($response[0]); |
||
17 | } |
||
18 | return $response; |
||
19 | } |
||
21 |