froala / KMSFroalaEditorBundle

Symfony bundle for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
105 stars 33 forks source link

Array keys assumed to be unset are not checked before accessed #55

Closed 01e9 closed 5 years ago

01e9 commented 6 years ago

https://github.com/froala/KMSFroalaEditorBundle/blob/a6555e02d34481196b6cb9e1c458264b4290647c/Service/OptionManager.php#L125-L130

When I add in config:

kms_froala_editor:
    imageManagerDeleteURL: null

I get

Notice: Undefined index: imageManagerDeleteURL

If I set false

kms_froala_editor:
    imageManagerDeleteURL: false

it works because this check passes

https://github.com/froala/KMSFroalaEditorBundle/blob/a6555e02d34481196b6cb9e1c458264b4290647c/Service/OptionManager.php#L148

but you may change that check in future releases (for example strict null check !== null) and will break my project.

Please change the checks to something more explicit/clear, so we can understand what values are allowed.

For example that if can be changed to

if( $imageManagerDeleteURL )
mounikasure commented 5 years ago

Verified image image