summaryrefslogtreecommitdiffstats
path: root/system/libraries/Migration.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries/Migration.php')
-rw-r--r--system/libraries/Migration.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index fd915c382..cc6fe48f0 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -104,8 +104,8 @@ class CI_Migration {
*/
public function __construct($config = array())
{
- # Only run this constructor on main library load
- if (get_parent_class($this) !== FALSE)
+ // Only run this constructor on main library load
+ if ( ! in_array(get_class($this), array('CI_Migration', config_item('subclass_prefix').'Migration'), TRUE))
{
return;
}
@@ -228,7 +228,7 @@ class CI_Migration {
$class = 'Migration_'.ucfirst(strtolower($this->_get_migration_name(basename($file, '.php'))));
// Validate the migration file structure
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
$this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class);
return FALSE;