Got this warning after updated to 6.x-1.5:
warning: array_key_exists(): The first argument should be either a string or an integer in /var/www/xxx/sites/all/modules/ckeditor/ckeditor.module on line 1285.
Maybe it is because I use PHP 5.3.5?

Comments

dczepierga’s picture

Status: Active » Postponed (maintainer needs more info)

Hi,

I make a little fix and commit it to GIT. Could u try to update to last DEV version and write does it help or not?

Greetings

Plus’s picture

Same issue on PHP 5.2.12. Patch helps (latest DEV fix this issue).

mkesicki’s picture

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

Thx @Plus for review. Anyone else can confirm if latest DEV fix this issue ?.

kipman’s picture

I have the same problem...
I come back from 6.x-1.5 to 6.x-1.4 and is ok, but i don't understand this problem...

metakel’s picture

It seems to me that the warning at the dev version is gone.

mkesicki’s picture

@kipman can you try latest DEV version ? This should fix this issue.
Thx @metakel for report issue and for test latest DEV.

u210ks’s picture

subscribing

dczepierga’s picture

Status: Needs review » Fixed

@u210ks, pls check last DEV version, there this bug is fixed.

Greetings

vito8877’s picture

If it is "fixed" why not update 6.x-1.5 version?

dczepierga’s picture

@vito8877, ckeditor module in version 6.x-1.5 is released so u cannot do any changes in this version... This fix will be released in next version od CKEditor module...

Greetings

Dxxxs’s picture

I also have this error

warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in .../sites/all/modules/ckeditor/ckeditor.module on line 1285.

mkesicki’s picture

@Dxxxs have you tried latest DEV version ?

u210ks’s picture

confirmed, the warning is fixed in the latest DEV version

However, I'm not able to edit a long content with images and text in it. For example: when I'm at the bottom of the content and click somewhere in the text to edit or add something, it expands the text area and moves me up to the toolbar. When I scroll down again to the bottom of the text area and click somewhere in the text it moves up to the toolbar again.

I'm able only to edit the text area when I switch to plain text editor, but in this case having a WYSIWYG editor is pointless.
Maybe I'm missing some setting here. Not sure if I explained well the issue I'm having.

Thanks for the great work!

dczepierga’s picture

@u219ks, try to update to last CKEditor library from http://ckeditor.com . As i remember good it was problem with it in the past, but they fix it...

Greetings

kuzmich’s picture

Hi!

  $default = language_default();
  if (array_key_exists($default, $scayt_langs)) {
    return $scayt_langs[$default];
  }

language_default() function return the object of language property. It can not be use as array keys!

This correct (IMHO):

  $default = language_default();
  if (array_key_exists($default->language, $scayt_langs)) {
    return $scayt_langs[$default];
  }
mkesicki’s picture

Status: Fixed » Needs work

thx
@kuzmich we will check this.

mkesicki’s picture

Status: Needs work » Fixed

@kuzmich I checked this and in code there is

  $default = language_default('language');
  if (array_key_exists($default, $scayt_langs)) {
    return $scayt_langs[$default];
  }

Please check latest DEV version, this bug is fixed in it.
PS. language_default doesn't return object but it's property or string -> refer to http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/langua...

thongchai’s picture

thx so much it work for me. :)

kuzmich’s picture

Yes. When the procedure is called with a parameter, it return a string...

efeefe’s picture

subscribing...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mkesicki’s picture

Title: warning: array_key_exists(): The first argument should be either a string or an integer at ckeditor.module » Fix warning: array_key_exists(): The first argument should be either a string or an integer at ckeditor.module