New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Mac/Linux line endings when unfolding lines #124
Comments
Thanks for the reply @u01jmg3. I'm curious, how are you loading this into the EventObject? I wonder if it's because I'm loading it into a file? I get identical behavior with either of the below scripts. $raw_ics_data = file_get_contents('file.ics');
$ical = new ICal( explode( "\n", $raw_ics_data ) );
$events = $ical->events();
print_r($events); $ical = new ICal('file.ics');
$events = $ical->events();
print_r($events); try this:
|
<?php
require_once '../vendor/autoload.php';
use ICal\ICal;
$ical = new ICal('file.ics', array(
'defaultSpan' => 2, // Default value
'defaultWeekStart' => 'MO', // Default value
'skipRecurrence' => false, // Default value
'useTimeZoneWithRRules' => false, // Default value
));
var_dump($ical->events()); |
@u01jmg3 Thanks for continuing to look into this. I had already tested your example script, which has the same behavior, and strangely, it's still not working. Do you think it's a php.ini setting? Here is the PHP script, with the same
<?php
require_once __DIR__.'/vendor/autoload.php';
use ICal\ICal;
if ( !ini_get( 'date.timezone' ) )
date_default_timezone_set( 'America/Chicago' );
$ical = new ICal('file.ics', array(
'defaultSpan' => 2, // Default value
'defaultWeekStart' => 'MO', // Default value
'skipRecurrence' => false, // Default value
'useTimeZoneWithRRules' => false, // Default value
));
var_dump($ical->events());
?> You can see the full output of this script, below.
|
Might be best to upload your |
@u01jmg3 I can't upload to github for some reason, but you can download the sample project here. |
|
@u01jmg3 Well, at least we've isolated the issue :) which version of PHP are you using? Can you also provide your PHP.ini? |
Btw. the |
|
Are you able to debug and try removing the |
@u01jmg3 I tried removing |
Try changing the |
Just tried with vanilla PHP5 and PHP7 installs on Linux. No change. If I add E,g, |
I found the issue and submitted a PR for you. |
|
I think the best way to deal with this is to directly manipulate the We can find array elements that have |
Feel free to pull together another PR - currently I only have time to fix bugs rather than explore developing enhancements. I can help where necessary though. |
5.5.38
Description of the Issue:
Within the ICS file, only the first line of multi-line
DESCRIPTION
is returned. In this example, onlyName: Bill
would be returned.ics snippet
Steps to Reproduce:
See above. Only the first line of the description field is returned.
The text was updated successfully, but these errors were encountered: