Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Create a bag not extended but ask to fetch causes error. #27

Closed
whikloj opened this issue Nov 15, 2019 · 1 comment
Closed

Create a bag not extended but ask to fetch causes error. #27

whikloj opened this issue Nov 15, 2019 · 1 comment

Comments

@whikloj
Copy link
Collaborator

whikloj commented Nov 15, 2019

Current logic in the bagit.php constructor means you can create a bag that is not extended but also make it fetch the contents of the fetch file.

To replicate, do

$tmp = "someNewDirectory";
new BagIt($tmp, false, false, true);

This results in the error Error: Call to a member function download() on null

Fetch should only be called if there is a fetch file loaded.

@whikloj
Copy link
Collaborator Author

whikloj commented Nov 25, 2019

Won't fix.

@whikloj whikloj closed this as completed Nov 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant