Browse files

Merge pull request #2036 from williamknauss/develop

Children Drivers
  • Loading branch information...
2 parents 719b60f + 0ab4d3a commit 539f34e2d15b3745cc73c45738c2d8a160473dd2 @narfbg narfbg committed Nov 28, 2012
Showing with 10 additions and 3 deletions.
  1. +10 −3 system/libraries/Driver.php
View
13 system/libraries/Driver.php
@@ -160,9 +160,16 @@ public function load_driver($child)
// Did we finally find the class?
if ( ! class_exists($class_name))
{
- $msg = 'Unable to load the requested driver: '.$class_name;
- log_message('error', $msg);
- show_error($msg);
+ if (class_exists($child_name))
+ {
+ $class_name = $child_name;
+ }
+ else
+ {
+ $msg = 'Unable to load the requested driver: '.$class_name;
+ log_message('error', $msg);
+ show_error($msg);
+ }
}
// Instantiate, decorate and add child

0 comments on commit 539f34e

Please sign in to comment.