$shortName = $className;
}
if (array_key_exists($shortName, $this->drivers)) {
- throw new \InvalidArgumentException('Driver ' . $shortName . ' is already registered.', 1314979451);
+ // Return immediately without changing configuration
+ if ($this->drivers[$shortName] === $className) {
+ return TRUE;
+ } else {
+ throw new \InvalidArgumentException('Driver ' . $shortName . ' is already registered.', 1314979451);
+ }
}
$this->drivers[$shortName] = $className;
$this->driverConfigurations[$shortName] = array(