Skip to content
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

Notice: Trying to access array offset on value of type bool in /src/vendor/phpseclib/phpseclib/phpseclib/Net/SFTP.php on line 2132 #1975

Closed
Saltibarsciai opened this issue Jan 12, 2024 · 1 comment

Comments

@Saltibarsciai
Copy link

in this code snippet function stat() can return false instead of array and cause notice on php 7.4

elseif ($mode & (self::RESUME | self::RESUME_START)) {
            // if NET_SFTP_OPEN_APPEND worked as it should _size() wouldn't need to be called
            $size = $this->stat($remote_file)['size'];
            $offset = $size !== false ? $size : 0;
        } 
@terrafrost
Copy link
Member

978a5d9 and 6b34da4 should fix this.

Sorry for not responding earlier - I was vacationing in Iceland and Norway (I'm from Texas so they're not exactly close).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants