diff --git a/cake/console/cake.php b/cake/console/cake.php index cae27bc5c..280516fa7 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -477,13 +477,14 @@ class ShellDispatcher { * * @param string $string String to output. * @param boolean $newline If true, the outputs gets an added newline. + * @return integer Returns the number of bytes output to stdout. * @access public */ function stdout($string, $newline = true) { if ($newline) { - fwrite($this->stdout, $string . "\n"); + return fwrite($this->stdout, $string . "\n"); } else { - fwrite($this->stdout, $string); + return fwrite($this->stdout, $string); } } diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index 246e312b4..fdba08f5c 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -370,13 +370,14 @@ class Shell extends Object { * * @param mixed $message A string or a an array of strings to output * @param integer $newlines Number of newlines to append + * @return integer Returns the number of bytes returned from writing to stdout. * @access public */ function out($message = null, $newlines = 1) { if (is_array($message)) { $message = implode($this->nl(), $message); } - $this->Dispatch->stdout($message . $this->nl($newlines), false); + return $this->Dispatch->stdout($message . $this->nl($newlines), false); } /**