Due to some extension manager processes when installing a new extension
the DriveRegistry has to support to register the same short name with the
same class name multiple times.
Change-Id: I67e409f532f5736b5a4c0a2e7fb822a579cfaa41
Fixes: #40843
Releases: 6.0
Reviewed-on: http://review.typo3.org/14532
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
$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(