rbac-php icon indicating copy to clipboard operation
rbac-php copied to clipboard

Throw exception when loading data from file failed

Open arogachev opened this issue 2 years ago • 1 comments

Currently the empty array is returned:

https://github.com/yiisoft/rbac-php/blob/cb61807d57945f7ab6b930bc8a3b343f0787eb46/src/CommonStorage.php#L24-L34

arogachev avatar Dec 07 '23 13:12 arogachev

That's checking if path is a file, not that it failed loading. On loading failure, an exception would be thrown. The reason for current code is for the file to be created automatically.

samdark avatar Dec 13 '23 16:12 samdark