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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | opengraph_meta_incorrect_argument_type_fix.patch | 1.05 KB | mezitlab |
| #1 | opengraph_meta-1492240.patch | 917 bytes | shark |
Comments
Comment #1
shark commentedFixed by attached patch.
Comment #2
mezitlab commentedshark: your patch is ok, but it isn't work with 6.x-1.7.
There is the same patch for 6.x-1.7.
Comment #3
torotil commentedHi,
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!