Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopvilar committed Aug 12, 2015
1 parent 88bd956 commit 9f58771
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public function params($key){

public function bindAndCall($cb){
ob_start();
$cb->bindTo($this, $this)->__invoke($this->args);
$ncb = $cb->bindTo($this, $this);
call_user_func_array($ncb, $this->args);
$this->write(ob_get_clean());
}

Expand Down
2 changes: 1 addition & 1 deletion src/router.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private function runCallback($cb, $query_vars, $res){

$res->bindAndCall($cb);

} else if(is_string($mid)) {
} else if(is_string($cb)) {
ob_start();
call_user_func_array($cb, [$res->request, $res]);
$res->write(ob_get_clean());
Expand Down

0 comments on commit 9f58771

Please sign in to comment.