summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2015-02-10 15:01:31 +0100
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2015-02-10 15:01:31 +0100
commitb203ff654fe4150677c2a3d30bf63ac017c49047 (patch)
treef430aaa07927e70d7484036eb7e34b24411763d4 /src
parentba439cbc324de12dc20b7a5b3ee35bc52a052e3f (diff)
downloadcsv-b203ff654fe4150677c2a3d30bf63ac017c49047.zip
csv-b203ff654fe4150677c2a3d30bf63ac017c49047.tar.gz
csv-b203ff654fe4150677c2a3d30bf63ac017c49047.tar.bz2
improved internal fpassthru method
Diffstat (limited to 'src')
-rw-r--r--src/Config/Output.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Config/Output.php b/src/Config/Output.php
index 7893ca7..babacf9 100644
--- a/src/Config/Output.php
+++ b/src/Config/Output.php
@@ -170,6 +170,9 @@ trait Output
/**
* Output all data from the CSV
+ *
+ * @return int Returns the number of characters read from the handle
+ * and passed through to the output.
*/
protected function fpassthru()
{
@@ -185,7 +188,9 @@ trait Output
$csv->fseek(strlen($input_bom));
}
echo $bom;
- $csv->fpassthru();
+ $res = $csv->fpassthru();
+
+ return $res + strlen($bom);
}
/**