fix bundle dependency error possibility. fix WSOD in view rendering.

This commit is contained in:
Taylor Otwell
2012-01-24 08:58:21 -06:00
parent 67696d8114
commit 27502918fb
2 changed files with 12 additions and 5 deletions

View File

@@ -46,7 +46,7 @@ class Bundle {
// dependent bundles so that they are available.
if (file_exists($path = static::path($bundle).'bundle'.EXT))
{
require $path;
require_once $path;
}
// Each bundle may also have a "routes" file which is responsible for
@@ -65,11 +65,9 @@ class Bundle {
*/
public static function routes($bundle)
{
if (static::started($bundle)) return;
if (file_exists($path = static::path($bundle).'routes'.EXT))
{
require $path;
require_once $path;
}
}