auth icon indicating copy to clipboard operation
auth copied to clipboard

Add check to non-empty pattern in `HttpHeader::withPattern()` method

Open vjik opened this issue 2 years ago • 2 comments
trafficstars

Do we need to add such a check and throw exception if pattern empty?

vjik avatar Sep 11 '23 18:09 vjik

Either we need to check the string or remove the non-empty string annotation.

rustamwin avatar Sep 12 '23 03:09 rustamwin

Either we need to check the string or remove the non-empty string annotation.

Pattern is used in preg_match (https://github.com/yiisoft/auth/blob/master/src/Method/HttpHeader.php#L100) and throws warning when it is empty. I think, non-empty string annotation must be keep.

vjik avatar Sep 12 '23 05:09 vjik