Skip to content
Snippets Groups Projects
Commit 911c25c3 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Qual: Better error management

parent 3022dff1
No related branches found
No related tags found
No related merge requests found
<?php
/* Copyright (C) 2006 Roman Ozana <ozana@omdesign.cz>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
......@@ -55,9 +55,15 @@ class ICal
function read_file($file)
{
$this->file = $file;
$file_text = join("", file($file)); //load file
$file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text);
$file_text='';
$tmparray=file($file);
if (is_array($tmparray))
{
$file_text = join("", $tmparray); //load file
$file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text);
}
return $file_text; // return all text
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment