Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi, I use APC caching via Cache Backport and got this message:
Missing argument 1 for drupal_valid_test_ua(), called in [warning]
/var/www/sites/all/modules/apc_d7/drupal_apc_cache.inc
on line 94 and defined bootstrap.inc:1883
Any fix?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#2 | apc-fix_missing_argument_1_for_drupal_valid_test_ua-1643670-2.patch | 518 bytes | pedroalb |
Comments
Comment #1
pedroalb CreditAttribution: pedroalb commentedI have this problem as well.
Any fix?
Comment #2
pedroalb CreditAttribution: pedroalb commentedTry and apply this patch. It should fix the problem. drupal_valid_test_ua function needs the $user_agent argument on drupal6.
Comment #3
chadmkidner CreditAttribution: chadmkidner commentedI am also experiencing this issue, patch provided did not solve but thanks for the attempt. My error is also appearing with
Notice: Undefined offset: 1 in drupal_valid_test_ua() (line 1863 of /home/content/04/8554604/html/development/includes/bootstrap.inc).
Appears once also for offset 2 and 3..
Any other suggestions? Thanks!
Comment #4
chadmkidner CreditAttribution: chadmkidner commentedThanks to @pedroalb I was able to fix this error by simply defining $user_agent
$user_agent = $_SERVER['HTTP_USER_AGENT'];
I ended up doing this in my bootstrap.inc file as I am using Pressflow and found there is another reference to user_agent there. There may be a better place for this for others, preferably not in core inc and perhaps this could be added as a patch to APC mod.
UPDATE: Okay scratch that.. My site was just playing tricks on me and after the errors appeared again I realized these were two separate issues and that $user_agent was never used in drupal_apc_cache.
So this problem remains and I have included $_SERVER['HTTP_USER_AGENT'] as suggested in the patch but it seems as though "User Agent" is just over all not being recognized?
Any thoughts??
Comment #5
R.Muilwijk CreditAttribution: R.Muilwijk commentedsee #1788606