[BUGFIX] Fix reverse order handling of MediaProvider 71/21471/4
authorAlexander Opitz <opitz.alexander@googlemail.com>
Mon, 17 Jun 2013 07:37:14 +0000 (09:37 +0200)
committerMarkus Klein <klein.t3@mfc-linz.at>
Mon, 17 Jun 2013 07:50:13 +0000 (09:50 +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/21471
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/frontend/Classes/MediaWizard/MediaWizardProviderManager.php

index 1a8d471..1593eb6 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;