Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Feb 22, 2021
2 parents 6e0b98c + 8a459ca commit 425993a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion phpseclib/Net/SFTP/Stream.php
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,9 @@ private function _stream_metadata($path, $option, $var)
// and https://github.com/php/php-src/blob/master/main/php_streams.h#L592
switch ($option) {
case 1: // PHP_STREAM_META_TOUCH
return $this->sftp->touch($path, $var[0], $var[1]);
$time = isset($var[0]) ? $var[0] : null;
$atime = isset($var[1]) ? $var[1] : null;
return $this->sftp->touch($path, $time, $atime);
case 2: // PHP_STREAM_OWNER_NAME
case 3: // PHP_STREAM_GROUP_NAME
return false;
Expand Down

0 comments on commit 425993a

Please sign in to comment.