pogosheep/IRC-Bot — Issue #2: First Run Issue
Author: super3
Created: 2012-01-09 23:23:12+00:00
State: open

When I tried to run your script for the first time I got this error:

*Warning: fopen(Logs/10-01-2012.log) [function.fopen]: failed to open stream: No such file or directory in* *C:\Users\Super3\Code\IRC-Bot\Classes\Library\IRCBot.php on line 145*

*Warning: fwrite() expects parameter 1 to be resource, boolean given in C:\Users\Super3\Code\IRC-**Bot\Classes\Library\IRCBot.php on line 298*

Here is the releveant function from that file:

```PHP
private function log( $log, $status = '' ) {
if (empty( $status )) {
$status = 'LOG';
}
fwrite( $this->logFileHandler, date( 'd.m.Y - H:i:s' ) . "\t [ " . $status . " ] \t" . FunctionCollection::removeLineBreaks( $log ) . "\r\n" );
}