nadar / quill-delta-parser

A PHP library to parse and render Quill WYSIWYG Deltas into HTML - Flexibel and extendible for custom elements.
MIT License
122 stars 20 forks source link

PHP8 - test for array key presence #48

Closed stijnster closed 3 years ago

stijnster commented 3 years ago

Hi there,

please review this pull request. Starting from PHP8, an E_WARNING is thrown when a value is retrieved from an array for a key that does not exist. The fix in this pull request should fix that issue.

nadar commented 3 years ago

Thanks, looks good. Interesting that unit test does does not cover that case.

stijnster commented 3 years ago

Yeah, might be the display_errors or error_reporting set to not include warnings :)

Thanks for picking this up so fast!

nadar commented 3 years ago

https://github.com/nadar/quill-delta-parser/blob/master/tests/DeltaTestCase.php#L7 it is - but maybe no tests which forces your scenario. thanks for making the library better @stijnster :+1: