// Read raw line and trim anything unwanted away
$data = trim($this->getPointerInstance()->readLine());
- // Parse data
+ // Is the line empty?
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data(%d)=%s', __METHOD__, __LINE__, strlen($data), $data));
+ if (empty($data)) {
+ // Yes, then skip below code
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] Read data is an empty line - EXIT!', __METHOD__, __LINE__));
+ return;
+ }
+
+ // Parse data
$lineArray = $this->parseDataToIndexedArray($data, $columnSeparator);
// Is the expected count found?