Skip to content

Commit

Permalink
Merge pull request #525 from lenton/3.4/bugfix/module-classes-reliance
Browse files Browse the repository at this point in the history
Don't use classes from modules until all modules are successfully enabled
  • Loading branch information
enov committed Aug 10, 2014
2 parents 741b96e + 66a1ac7 commit 4a7c74f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions classes/Kohana/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -489,10 +489,7 @@ public static function modules(array $modules = NULL)
else
{
// This module is invalid, remove it
throw new Kohana_Exception('Attempted to load an invalid or missing module \':module\' at \':path\'', array(
':module' => $name,
':path' => Debug::path($path),
));
throw new Exception('Attempted to load an invalid or missing module "'.$name.'" at "'.$path.'"');
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/kohana/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public function provider_modules_detects_invalid_modules()
*
* @test
* @dataProvider provider_modules_detects_invalid_modules
* @expectedException Kohana_Exception
* @expectedException Exception
* @param boolean $source Input for Kohana::modules
*
*/
Expand Down

0 comments on commit 4a7c74f

Please sign in to comment.