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

Last PR triggers errors when file does not exists in system. #4

Open
ulinskas opened this issue Oct 23, 2018 · 2 comments
Open

Last PR triggers errors when file does not exists in system. #4

ulinskas opened this issue Oct 23, 2018 · 2 comments

Comments

@ulinskas
Copy link

This PR https://github.com/Litipk/flysystem-fallback-adapter/pull/2 created issue, you should revert these changes.

How it was before:

if ($this->mainAdapter->has($path)) {
    return $this->mainAdapter->read($path);
}

How it is now:

$result = $this->mainAdapter->read($path);
if (false !== $result) {
    return $result;
}

I agree that this changes save some performance. But now, you get warning if file does not exists in system (If errors are not suppressed)

@thomasvargiu
Copy link

Same for readStream. When you have the local adapter, trying to call fopen() with not existing file throws an error.

@stephanvierkant
Copy link

stephanvierkant commented Dec 6, 2018

I already created a PR (#3) to revert this change (#2), mentioned in #1.

For now, you can use version 0.1.2.

jenszahner pushed a commit to jenszahner/flysystem-fallback-adapter that referenced this issue Nov 12, 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

3 participants