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

Comments

Priority:Normal» Critical

I have this problem as well.
Any fix?

Version:7.x-1.0-beta4» 6.x-1.x-dev
Status:Active» Needs review
StatusFileSize
new518 bytes

Try and apply this patch. It should fix the problem. drupal_valid_test_ua function needs the $user_agent argument on drupal6.

Status:Needs review» Needs work

I 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!

Status:Needs work» Needs review

Thanks 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??

Status:Needs review» Closed (duplicate)

see #1788606