On a fresh install of 6.x-1.x-dev, I'm getting the following error:

warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/walkingpc/wpcwalks.org/stage/drupal/sites/all/modules/opengraph_meta/opengraph_meta.common.inc on line 493.

To reproduce:

* download and enable module
* on the CCK page (/admin/content/types), make sure that no CCK types have a text field attached
* on the settings page (/admin/config/content/opengraph_meta), under 'ENABLE FOR THE FOLLOWING CONTENT TYPES:', pick e.g. 'Page', and click 'Save' at the bottom.

Result:

The error above is shown.

Expected result:

No error is shown.

The offending code:

 if (array_key_exists($cck_content_type_id, $form_values['description_cck']))
          variable_set($cck_content_type_id, $form_values['description_cck'][$cck_content_type_id]);

Note that the form value description_cck will only be set if a CCK type has a textfield attached.

Comments

shark’s picture

StatusFileSize
new917 bytes

Fixed by attached patch.

mezitlab’s picture

Version: 6.x-1.x-dev » 6.x-1.7
StatusFileSize
new1.05 KB

shark: your patch is ok, but it isn't work with 6.x-1.7.
There is the same patch for 6.x-1.7.

torotil’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Hi,

I'm the new maintainer of opengraph_meta. Sorry for the long silence in the issue queue.

Sadly I don't have the resources to care for the Drupal 6 version. Unless and until someone steps up to maintain it I'm therefore closing all D6 issues as WONTFIX.

Feel free to re-open the issue if it is still valid in one of the Drupal 7 branches.

Thanks!