{
protected $_rep;
protected $_file;
- protected $_files;
+ protected $_files = array();
protected $_rev;
protected $_author;
protected $_tags = array();
{
return is_null($file)
? $this->_files
- : (isset($this->_files[$file]) ? $this->_files[$file] : null);
+ : (isset($this->_files[$file]) ? $this->_files[$file] : array());
}
}
throw new Horde_Vcs_Exception('Unable to run ' . $cmd . ': ' . error_get_last());
}
- $line = trim(fgets($pipe));
+ //$line = trim(fgets($pipe));
while (true) {
- $line = fgets($pipe);
- if ($line === false) {
- throw new Horde_Vcs_Exception('Unexpected end of log output');
- }
-
- $line = trim($line);
- if ($line == '') { break; }
-
+ $line = trim(fgets($pipe));
+ if (!strlen($line)) { break; }
if (strpos($line, ':') === false) {
throw new Horde_Vcs_Exception('Malformed log line: ' . $line);
}
$log = '';
$line = fgets($pipe);
- while (substr($line, 0, 1) != ':') {
+ while ($line !== false && substr($line, 0, 1) != ':') {
$log .= $line;
$line = fgets($pipe);
}