yii2 icon indicating copy to clipboard operation
yii2 copied to clipboard

Fixed adding new css class to previously added CSS class key for bug …

Open lawgiver00 opened this issue 3 years ago • 3 comments

…#19012

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Fixed issues Fixes #19012, if you tried to add another class to an already existing key as described in the dumentation for addCssClass it would ignore any attempt except for the first one. This fix find the key and adds the additional classes as originally intended.

lawgiver00 avatar Dec 01 '22 06:12 lawgiver00

  • Added a new css class to previously added CSS class key
  • Changed visibility of yii\web\View::isPageEnded to protected

what-the-diff[bot] avatar Dec 01 '22 06:12 what-the-diff[bot]

Thank you for putting effort in the improvement of the Yii framework. We have reviewed your pull request.

In order for the framework and your solution to remain stable in the future, we have a unit test requirement in place. Therefore we can only accept your pull request if it is covered by unit tests.

Could you add these please?

Thanks!

P.S. If you have any questions about the creation of unit tests? Don't hesitate to ask for support. More information about unit tests

This is an automated comment, triggered by adding the label pr:request for unit tests.

yii-bot avatar Dec 01 '22 17:12 yii-bot

if you tried to add another class to an already existing key as described in the dumentation for addCssClass it would ignore any attempt except for the first one.

This is intended behavior, it is explained in addCssClass() documentation:

If class specification at given options is an array, and some class placed there with the named (string) key, overriding of such key will have no effect.

8c49ef0b

The only suspicious thing in #19012 is that behavior differs between string and array.

rob006 avatar Dec 05 '22 14:12 rob006