From 0117887141546280d3d0e8c5faaef30ad9a4f5d9 Mon Sep 17 00:00:00 2001 From: Anthony Regeda Date: Wed, 30 Jul 2014 14:06:46 +0400 Subject: [PATCH] fixed Fatal error: Cannot access self:: when no class scope is active --- src/Castel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Castel.php b/src/Castel.php index 78e3c8a..cab1a50 100644 --- a/src/Castel.php +++ b/src/Castel.php @@ -74,7 +74,7 @@ public function extend($id, Closure $callable) } $parent = $this->values[$id]; $this->values[$id] = function ($c) use ($callable, $parent) { - return $callable(self::fabricate($parent, $c), $c); + return $callable(Castel::fabricate($parent, $c), $c); }; if (property_exists($this, $id)) { $this->$id = $callable($this->$id, $this);