-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add return for deleteFromGlob #92
Comments
There is a way to test it. Of course, an internal Exception would be better, I know. $zipFile->deleteFromGlob('**.{xml,json}');
if(isset($zipFile['composer.json'])); {
throw new \PhpZip\Exception\ZipException('The file could not be deleted');
} |
thank you for your reply |
I guess you are mixing some concerns. This has nothing to do with the PHP language and the script mode. To make sure that your application specific config options are valid and that the source path exists, you may use a validator for that specific use case. |
i just give you an example that how php handle such errors . i hope you get what i mean |
Just to be clear. My answer was only related to your first question. I know how errors should be better handled. Note that I'm not a maintainer of this package and that this is not "my" code. Also note that the |
hi please add some return or throw for methods like
deleteFromGlob
for when path is not valid and no file exist to deletethere is no way to find out the result of this methods
please fix that
The text was updated successfully, but these errors were encountered: