|
while (true) { |
|
$data = $this->queryApi($apiOpenResult, $step); |
|
if (empty($data)) break; |
|
|
|
$step++; |
|
// Send meta and data |
|
// ... |
|
if (is_array($data) && count($data) > 0) { |
|
if (!$this->metaSent) { |
|
$metaData = $this->metaData; |
|
$row0 = $this->mapRow(array_values($data)[0]); |
|
foreach ($row0 as $key => $value) { |
|
$metaData["columns"][$key] = array( |
|
"type" => $this->guessType($value), |
|
); |
|
} |
|
$this->sendMeta($metaData, $this); |
|
$this->metaSent = true; |
|
$this->startInput(null); |
|
} |
|
foreach ($data as $row) { |
|
$row = $this->mapRow($row); |
|
$this->next($row); |
|
} |
|
} |
|
} |
|
|
The while loop never ends.
Caused by the check if (is_array($data) && count($data) > 0) which will never be evaluated to true because $data is always a string.
So currently APIDataSource is usless
core/src/datasources/APIDataSource.php
Lines 212 to 238 in d356f3b
The while loop never ends.
Caused by the check
if (is_array($data) && count($data) > 0)which will never be evaluated totruebecause$datais always a string.So currently APIDataSource is usless