Qual: Better error management
This commit is contained in:
parent
3022dff108
commit
911c25c3fd
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Roman Ozana <ozana@omdesign.cz>
|
/* Copyright (C) 2006 Roman Ozana <ozana@omdesign.cz>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* 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>
|
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -55,8 +55,14 @@ class ICal
|
|||||||
function read_file($file)
|
function read_file($file)
|
||||||
{
|
{
|
||||||
$this->file = $file;
|
$this->file = $file;
|
||||||
$file_text = join("", file($file)); //load file
|
$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);
|
$file_text = preg_replace("/[\r\n]{1,} ([:;])/","\\1",$file_text);
|
||||||
|
}
|
||||||
|
|
||||||
return $file_text; // return all text
|
return $file_text; // return all text
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user