From 4edcc321aa5c763d53f45ca8d3175a4c5cc72790 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 7 Oct 2011 12:26:47 -0500 Subject: [PATCH] fixed bug in route to controller delegation. --- laravel/routing/caller.php | 2 +- laravel/routing/route.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/laravel/routing/caller.php b/laravel/routing/caller.php index 2b52da38..76091197 100644 --- a/laravel/routing/caller.php +++ b/laravel/routing/caller.php @@ -135,7 +135,7 @@ class Caller { */ protected function callable($method) { - return $method == 'before' or $method == 'after' or strncmp($method, '_', 1) === 0; + return $method !== 'before' and $method !== 'after' and strncmp($method, '_', 1) !== 0; } /** diff --git a/laravel/routing/route.php b/laravel/routing/route.php index bc711b43..af6035dc 100644 --- a/laravel/routing/route.php +++ b/laravel/routing/route.php @@ -136,7 +136,7 @@ class Route { */ public function delegates() { - return is_array($this->callback) and isset($this->callback['delegate']); + return is_string($this->callback) or (is_array($this->callback) and isset($this->callback['delegate'])); } /**