u01jmg3 / ics-parser

Parser for iCalendar Events • PHP 8+, 7 (≥ 7.4), 5 (≥ 5.6)
MIT License
448 stars 144 forks source link

ErrorException: Trying to access array offset on value of type bool #260

Closed Satariall closed 4 years ago

Satariall commented 4 years ago

Description of the Issue:

Function keyValueFromString can returns false for the zero matches. In that case the initLines function on line 627 goes to crash https://github.com/u01jmg3/ics-parser/blob/master/src/ICal/ICal.php#L627

Simple add behaviour for the false return.