Commits

Greg Aker committed 6051ff8

swapping out preg_replace() in the driver library where str_replace() works just fine.

  • Participants
  • Parent commits 0d4e3c3
  • Branches unit_tests

Comments (0)

Files changed (1)

system/libraries/Driver.php

 
 		// The class will be prefixed with the parent lib
 		$child_class = $this->lib_name.'_'.$child;
-
+	
 		// Remove the CI_ prefix and lowercase
-		$lib_name = ucfirst(strtolower(preg_replace('/^CI_/', '', $this->lib_name)));
-		$driver_name = strtolower(preg_replace('/^CI_/', '', $child_class));
-
+		$lib_name = ucfirst(strtolower(str_replace('CI_', '', $this->lib_name)));
+		$driver_name = strtolower(str_replace('CI_', '', $child_class));
+		
 		if (in_array($driver_name, array_map('strtolower', $this->valid_drivers)))
 		{
 			// check and see if the driver is in a separate file