When I enabled the Open Standards Media Player after enabling MediaFront I got this Warning

Warning: Invalid argument supplied for foreach() in osmplayer_get_themes() (line 664 of /var/www/vhosts/bowlingtimes.co.uk/httpdocs/sites/all/modules/mediafront/players/osmplayer/osmplayer.module).

The line 664 is in the function

658function osmplayer_get_themes($base_path) {
659  $themes = array();
660  $path = getcwd() . '/' . $base_path . '/*';
661  foreach(glob($path, GLOB_ONLYDIR) as $dir) {
662    $name = basename($dir);
663    $theme_path = $base_path . '/' . $name;
664    foreach (glob($dir . '/*.css') as $css) {
665      $themes[$name] = array(
666        'url' => $theme_path . '/' . basename($css),
667        'options' => array('type' => 'file', 'group' => CSS_DEFAULT)
668      );
669      break;
670    }
671  }
672  return $themes;
673}

I am using Corolla 7.x-3.0-rc1 as my default theme.

Themes also enabled are:
AT Admin 7.x-3.1 : as my Administration theme.
Bartik 7.17
Interactive Media 7.x-3.2
Seven 7.17

Is this Warning going to affect the use of Mediafront and the Open Standards Media Player?

This is a fresh install of Drupal 7.17 installed on the 14th November 2012.

Comments

ultimike’s picture

Status: Active » Postponed (maintainer needs more info)

Is this issue still occurring in the latest release candidate? If not, please close this issue.

Thanks,
-mike

taxicab221’s picture

Status: Postponed (maintainer needs more info) » Needs work

This is the latest release candidate that is available from the Drupal site.

When running the Available updates report, the report states that MediaFront is up to date.

This is what I did next.

Flushed all caches

Warning: Invalid argument supplied for foreach() in osmplayer_get_themes() (line 664 of /var/www/vhosts/bowlingtimes.co.uk/httpdocs/sites/all/modules/mediafront/players/osmplayer/osmplayer.module)

re-occurred.
Went to https://github.com/mediafront/osmplayer/downloads and downloaded osmplayer-2.x.tar.gz.
Extracted the file.
Un-enabled Open Standards Media Player, then un-installed same.
Flushed all caches. No Errors.
Deleted all the folders and files in the 'player' folder.
Up-loaded new files to web site.
Enabled Open Standards Media Player: No errors
Flushed all caches: No Errors.

Seems that the latest files from 'github' have not been included in the current MediaFront download from the Drupal site.

Problem solved

Thanks
Dave