Fatal error: Unsupported operand types in /mysite/sites/all/modules/emfield/emfield.admin.inc on line 41, which appears to be

'#options' => array('' => '') + flvmediaplayer_profile_get_configs()

I can attach a callstack image if you like, but tracing through what appear to be happening is...
- I just installed flvmediaplayer module, but never touched the admin screen so no profiles
- flvmediaplayer_profile_get_configs() is returning null

Don't have time to do more at the moment, but perhaps that helps?

I'm using latest dev versions of the various supporting modules (cck 2.x branch though).

Comments

winston’s picture

Project: Embedded Media Field » FLV Media Player

Moving this issue to flvmediaplayer as I think this may be the proper place

Function flvmediaplayer_profile_get_configs in flvmediaplayer.module says it returns an array, however on a new install, without the user having created any profiles yet, it instead returns null. The null breaks emfield which tries to present a profile select list at /admin/content/emfield.

I suppose it could be fixed in either place, but since the function says it returns an array I'm thinking returning a null is unintended?

Here is a quick code fix to the flvmediaplayer_profile_get_configs function

  if (is_null($profiles)) {
    return array();
  }
  return $profiles;

I'm brand new to flvmediaplayer so I have no idea if it relies on returning a null anywhere else.

Let me know if you want me to roll a patch.