Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | jquery_update_20100310.patch | 1.04 KB | ccshannon |
#6 | jquery_update_20100310.patch | 1.21 KB | ccshannon |
Comments
Comment #1
marcelboere CreditAttribution: marcelboere commentedFor 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
Comment #2
georgedamonkey CreditAttribution: georgedamonkey commentedFor me, I had it on Production all ready. So, it's still giving that error.
Comment #3
tonyhrx CreditAttribution: tonyhrx commentedYep Im getting this error too
Comment #4
ccshannon CreditAttribution: ccshannon commentedI just installed jQuery Update on a fresh 6.15 site and I'm getting this error as well.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI am also getting this error sporadically, and can't for the life of me fix it. If it gets solved PLEASE POST!
Lol, thanks.
Comment #6
ccshannon CreditAttribution: ccshannon commentedPLEASE IGNORE THIS PATCH. IT HAS AN ERROR AND I CANNOT REMOVE THE POST.
Thanks!
Comment #7
ccshannon CreditAttribution: ccshannon commentedSorry 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
Comment #8
georgedamonkey CreditAttribution: georgedamonkey commentedI 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!!
Comment #9
mfer CreditAttribution: mfer commentedI committed a slightly modified version. Nice catch.