zendframework / zend-view

View component from Zend Framework
BSD 3-Clause "New" or "Revised" License
49 stars 61 forks source link

Fixes #134 : add Exception on HeadeMeta::setCharset() when the doctype is Xhtml #137

Closed samsonasik closed 7 years ago

samsonasik commented 7 years ago

Fixes #134

froschdesign commented 7 years ago

@samsonasik The bug report includes another problem:

->setMeta('charset', 'utf-8');

Method "setMeta" does not exist

The exception message is wrong:

https://github.com/zendframework/zend-view/blob/4d9954c05a3981ca711bd55932dc1d2b55580392/src/Helper/HeadMeta.php#L442

Remove the hint to the method "setMeta" and update the DocBlock. Add a short example and fix also the data type for the value parameter. The same for the methods prepend and append.

Thanks in advance!

samsonasik commented 7 years ago

I've updated exception messages and docblock param in HeadMeta::set(), append(), prepend(), do you have suggestion for data type parameter ? the stdClass check already in isValid() method so I think the type parameter should not be used, instead only update the docblock parameter.

froschdesign commented 7 years ago

…instead only update the docblock parameter.

That's what i meant!

froschdesign commented 7 years ago

@samsonasik Thanks for your contribution! 👍