diff --git a/phpseclib/Net/SCP.php b/phpseclib/Net/SCP.php index 4cfa3570..f66a535a 100644 --- a/phpseclib/Net/SCP.php +++ b/phpseclib/Net/SCP.php @@ -216,7 +216,7 @@ class Net_SCP $sent+= strlen($temp); if (is_callable($callback)) { - $callback($sent); + call_user_func($callback, $sent); } } $this->_close(); diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 2fddb68a..d3bc7c60 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -2258,7 +2258,7 @@ class Net_SSH2 return false; default: if (is_callable($callback)) { - $callback($temp); + call_user_func($callback, $temp); } else { $output.= $temp; }