diff --git a/src/Illuminate/Foundation/Application.php b/src/Illuminate/Foundation/Application.php index 8e3daa139886..75abb18b6b48 100755 --- a/src/Illuminate/Foundation/Application.php +++ b/src/Illuminate/Foundation/Application.php @@ -870,14 +870,18 @@ public function register($provider, $force = false) // If there are bindings / singletons set as properties on the provider we // will spin through them and register them with the application, which // serves as a convenience layer while registering a lot of bindings. - foreach ($provider->bindings as $key => $value) { - $this->bind($key, $value); + if (property_exists($provider, 'bindings')) { + foreach ($provider->bindings as $key => $value) { + $this->bind($key, $value); + } } - foreach ($provider->singletons as $key => $value) { - $key = is_int($key) ? $value : $key; + if (property_exists($provider, 'singletons')) { + foreach ($provider->singletons as $key => $value) { + $key = is_int($key) ? $value : $key; - $this->singleton($key, $value); + $this->singleton($key, $value); + } } $this->markAsRegistered($provider); diff --git a/src/Illuminate/Support/ServiceProvider.php b/src/Illuminate/Support/ServiceProvider.php index a43ce9d444cd..7395397a3eca 100755 --- a/src/Illuminate/Support/ServiceProvider.php +++ b/src/Illuminate/Support/ServiceProvider.php @@ -19,20 +19,6 @@ abstract class ServiceProvider */ protected $app; - /** - * All of the container bindings that should be registered. - * - * @var array - */ - public $bindings = []; - - /** - * All of the singletons that should be registered. - * - * @var array - */ - public $singletons = []; - /** * All of the registered booting callbacks. *