Skip to content

Conversation

@xabbuh
Copy link
Member

@xabbuh xabbuh commented Nov 17, 2013

...t

If you specify only one entry of excluded_404s in an XML based config, Symfony terminates with a Invalid type for path "monolog.handlers.main.excluded_404s". Expected array, but got string error.

@Seldaek
Copy link
Member

Seldaek commented Nov 17, 2013

I think it should be done with a ->fixXmlConfig('excluded_404') instead no?

@xabbuh
Copy link
Member Author

xabbuh commented Nov 17, 2013

fixXmlConfig() would mean to be able to use <excluded_404> instead of <excluded_404s> in XML. I can add that, too. But this doesn't address the original problem.

@Seldaek
Copy link
Member

Seldaek commented Nov 17, 2013

I think fixXmlConfig also takes care of turning a single record in an array, but I might be wrong, didn't use xml configs in ages. Anyway I'd be happy if you add it so we cover everything, I guess your current patch is still valuable to allow single strings to work in yaml.

@xabbuh
Copy link
Member Author

xabbuh commented Nov 17, 2013

I added the fixXmlConfig() call. I also double-checked what you wrote about it and noticed that you were right and I was wrong. Thus, my original change isn't really necessary. Should I remove it or keep it to allow single strings in YAML?

@Seldaek
Copy link
Member

Seldaek commented Nov 17, 2013

Hmm, I guess maybe best to remove it, it's not so hard to define arrays in yaml :)

@xabbuh
Copy link
Member Author

xabbuh commented Nov 18, 2013

Thanks for your feedback. I agree with you that's defining array in YAML is not such a hard task. ;) I removed the normalisation part.

@Seldaek
Copy link
Member

Seldaek commented Nov 18, 2013

Thanks!

Seldaek added a commit that referenced this pull request Nov 18, 2013
fix config to work with exactly one value for excluded_404s in XML forma...
@Seldaek Seldaek merged commit c6af60b into symfony:master Nov 18, 2013
@xabbuh xabbuh deleted the excluded-404s-single-xml-value branch November 18, 2013 08:38
@xabbuh
Copy link
Member Author

xabbuh commented Nov 18, 2013

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants