<?php
/***************************************************************************
- * Copyright (C) 2003-2010 Polytechnique.org *
+ * Copyright (C) 2003-2011 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
public function __construct()
{
- $this->file = fopen(Platal::globals()->spoolroot . '/spool/tmp/site_errors', 'r');
+ $file = Platal::globals()->spoolroot . '/spool/tmp/site_errors';
+ if (file_exists($file)) {
+ $this->file = fopen($file, 'r');
+ } else {
+ $this->file = null;
+ }
}
public function next()