support arbitrarily large accelerated search results

This commit is contained in:
Shish 2019-04-28 09:55:28 +01:00
parent 037b1f0f70
commit 505877a330

View file

@ -191,7 +191,13 @@ class Image {
return null;
}
fwrite($fp, json_encode($req));
$data = fgets($fp, 1024);
$data = "";
while (($buffer = fgets($fp, 4096)) !== false) {
$data .= $buffer;
}
if (!feof($fp)) {
die("Error: unexpected fgets() fail in query_accelerator($req)\n");
}
fclose($fp);
return json_decode($data);
}