You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FOGSSH::disconnect(): 'Undefined array key "_link"' warning on reuse, TypeError without a live session #1997
Services write PHP Warning: Undefined array key "_link" in src/Net/FOGSSH.php on line 133 to servicemaster.log. This box logged 285 of them.
FOGSSH::disconnect() without a live SSH session throws TypeError: ssh2_disconnect(): Argument #1 ($session) must be of type resource. That happens after a failed connect() (link is false) or after an earlier disconnect() (link is null).
Cause
disconnect() calls unset($this->_link) and unset($this->_sftp). PHP routes the next read of an unset declared property to __get(). __get() reads $this->data['_link'], which does not exist. FOGSSH is one shared instance, so the next connect() or disconnect() warns.
disconnect() passes the link to ssh2_disconnect() without checking it. On PHP 8, a non-resource argument is a TypeError, and @ does not suppress it.
Fix
Set both properties to null. Do not unset() them.
Call ssh2_disconnect() only when the link is a resource.
Activity
mastacontrola commentedon Oct 28, 2026
Fixed on
working-1.6in #1998 and onrc-1.6.0in #1999. RC18 still has the bug. The fix ships in the next RC.mastacontrola commentedon Oct 28, 2026
The fix is in 1.6.0-RC-19: https://github.com/FOGProject/fogproject/releases/tag/1.6.0-RC-19 . Update with
bin/updatefog.sh --channel rc.