mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 18:31:37 +02:00
Strip UTF-8 BOM from ical file
This commit is contained in:
parent
915445fc44
commit
7efefc6e63
@ -161,7 +161,7 @@ class IcalIterator extends Horde_Icalendar implements \Iterator
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$line = fgets($this->ical_file);
|
$line = ltrim(fgets($this->ical_file), "\xef\xbb\xbf");
|
||||||
}
|
}
|
||||||
// check if end of container reached
|
// check if end of container reached
|
||||||
if ($this->container && $line && substr($line,0,4+strlen($this->base)) === 'END:'.$this->base)
|
if ($this->container && $line && substr($line,0,4+strlen($this->base)) === 'END:'.$this->base)
|
||||||
@ -229,6 +229,7 @@ class IcalIterator extends Horde_Icalendar implements \Iterator
|
|||||||
|
|
||||||
while (($line = $this->read_line()) && substr($line,0,6) !== 'BEGIN:')
|
while (($line = $this->read_line()) && substr($line,0,6) !== 'BEGIN:')
|
||||||
{
|
{
|
||||||
|
error_log("'".$line."'");
|
||||||
// ignore it
|
// ignore it
|
||||||
}
|
}
|
||||||
if ($line === false) // end-of-file or end-of-container
|
if ($line === false) // end-of-file or end-of-container
|
||||||
|
Loading…
x
Reference in New Issue
Block a user