Hello,

I've been getting this error on my sites lately, and I'm stumped as to what may be causing it. Does anyone have any ideas what I may be doing wrong?

array_search() [<a href='function.array-search'>function.array-search</a>]: Wrong datatype for second argument in /var/clients/client0/web2/web/sites/all/modules/jquery_update/jquery_update.module on line 40.

Comments

For me this error occurred when selecting development compression level in /admin/settings/jquery_update

Choose jQuery compression level:
Production (Minified)
Development (Uncompressed Code)

So I switched back to Production

For me, I had it on Production all ready. So, it's still giving that error.

Yep Im getting this error too

I just installed jQuery Update on a fresh 6.15 site and I'm getting this error as well.

Assigned:Unassigned» drewbolles

I am also getting this error sporadically, and can't for the life of me fix it. If it gets solved PLEASE POST!

Lol, thanks.

StatusFileSize
new1.21 KB

PLEASE IGNORE THIS PATCH. IT HAS AN ERROR AND I CANNOT REMOVE THE POST.

Thanks!

StatusFileSize
new1.04 KB

Sorry about that. Try this patch. This should remove the error. Apparently, PHP array_search function is being run on an object that is supposed to be an array, but many times is not. This patch checks the array to make sure it has elements in it, before running the array_search function.

This is against 6.x-2.x-dev

Run this patch from within the jquery_update/ folder

I can confirm the patch worked beautifully for me. I've got a multi-site setup with about 10 sites and it worked perfectly for all of them.

Thank you!!

Status:Active» Fixed

I committed a slightly modified version. Nice catch.

Status:Fixed» Closed (fixed)

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