Skip to content

Uncaught Error: Call to a member function sorted() on array #63

@gaelgerard

Description

@gaelgerard

Hi,

When I use the foreach loop as described in the doc, I get that fatal Error

foreach ($cal->getEvents()->sorted() as $event) {

Uncaught Error: Call to a member function sorted() on array

If I remove the sorted part, the script is working but it seems there are confusions in the event Dates

foreach ($cal->getEvents() as $event) {
My php version is 7.4.27 and installed icalparser via composer this week.

What could I have missed?

Thank you for your Help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions