[BUGFIX] Fix reverse order handling of MediaProvider 73/21473/2
authorAlexander Opitz <opitz.alexander@googlemail.com>
Mon, 17 Jun 2013 07:37:14 +0000 (09:37 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Sun, 7 Jul 2013 22:59:31 +0000 (00:59 +0200)
Fixing the variable used to test for valid providers in reverse order.

Resolves: #49136
Releases: 6.2, 6.1, 6.0
Change-Id: Ia80366150b853138fc41c09e59df993e1540b230
Reviewed-on: https://review.typo3.org/21473
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/frontend/Classes/MediaWizard/MediaWizardProviderManager.php

index d44d1a9..9524620 100644 (file)
@@ -62,7 +62,7 @@ class MediaWizardProviderManager {
        static public function getValidMediaWizardProvider($url) {
                // Go through registered providers in reverse order (last one registered wins)
                $providers = array_reverse(self::$providers, TRUE);
-               foreach (self::$providers as $className => $provider) {
+               foreach ($providers as $provider) {
                        /** @var $provider \TYPO3\CMS\Frontend\MediaWizard\MediaWizardProviderInterface */
                        if ($provider->canHandle($url)) {
                                return $provider;