Merge pull request #280 from nickygerritsen/master

Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not

* nickygerritsen/master:
  Also replace this with call_user_func
  Use call_user_func, as this will work on PHP < 5.4, whereas $callback() does not
This commit is contained in:
Andreas Fischer 2014-03-06 12:01:14 +01:00
commit aa64ddfd4d
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ class Net_SCP
$sent+= strlen($temp); $sent+= strlen($temp);
if (is_callable($callback)) { if (is_callable($callback)) {
$callback($sent); call_user_func($callback, $sent);
} }
} }
$this->_close(); $this->_close();

View File

@ -2258,7 +2258,7 @@ class Net_SSH2
return false; return false;
default: default:
if (is_callable($callback)) { if (is_callable($callback)) {
$callback($temp); call_user_func($callback, $temp);
} else { } else {
$output.= $temp; $output.= $temp;
} }