Was trying to add a service with invoice using cpanel module but with no actual provision as the service already exists on cpanel server. 
the term is 1 year. after adding the details I goto the next page which displays all the info and gives me two buttons, either to add service or edit service (URL admin/clients/addservice/4/3/1). when I click on add service I get the following error. 
  
 
  
when checking on client side the service is added to the client, but no invoice is created. 
  
Blesta version 3.0 released 
OS : cloud linux 6.0 x64 
php : 5.4.17 
Apache 2.2 
Mysql 5.5.32 
  
  
for quick ref. the line from error above is the return line in this function (in class StreamWriter) : 
  
    function close() {
        $this->close = true;
        return implode('', $this->buffer);
    }