If I have a field in a node for a video file being handled by the JW player module and there has been no video uploaded for said field, I get the error:
warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /var/www/vhosts/sitename/httpdocs/sites/all/modules/jwplayermodule/integrations/int_filefield/jwfilefield.module on line 73.

I've displayed the content both as a "regular node" and as a query within a Panel and the results are the same.

I've seen other reports of this error happening because of PHP 5.3, but have not seen it mentioned in this forum (nor have I seen a real fix). Any suggestions on how to address this would be greatly appreciated!

Comments

HunterElliott’s picture

I should have also noted that when I used a query (View) to display the field, I did check the appropriate boxes so as to not display the field if it is empty (and tried it with those box values unchecked as well), but the error still displays.

giorgosk’s picture

Status: Active » Needs review
StatusFileSize
new582 bytes

Here is a simple patch that fixes this for php 5.3

krisahil’s picture

Issue summary: View changes
StatusFileSize
new2.49 KB

Here's a more fleshed-out version that fixes the code in two places. I try to use filefield_content_is_empty() where reasonable.

krisahil’s picture

StatusFileSize
new2.49 KB