Missing argument in user/1

int - January 20, 2008 - 21:19
Project:fastpath_fscache
Version:5.x-1.0-rc1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

in http://www.site.com/user/1

warning: Missing argument 4 for fastpath_fscache_user() in /mnt/w0511/d44/s22/b02bd24d/www/max-pt.net/sites/all/modules/fastpath_fscache/fastpath_fscache.module on line 91.

#1

greggles - April 4, 2008 - 11:53
Status:active» needs review

I'm seeing this too. I'm not sure what the consequence is though.

Checking that line it is the function signature for hook_user. Looking at the docs for hook_user - http://api.drupal.org/api/function/hook_user/5 - it seems that

1) this function wasn't taking some of the args by reference which is probably should
2) this function wasn't using a default for $category so when the optional $category parameter was passed, php wasn't able to default it and instead complains.

I'm not sure that this is critical or even causes any problems, necessarily, but the attached patch should fix it (I haven't tested it yet, I'll be watching my logs to see if the error comes up again).

@int - please test out the patch and respond back if it solves the problem for you (and also what the problem you experience is).

AttachmentSize
fastpath_fscache_user_args_212315-1.patch 803 bytes

#2

Veggieryan - May 23, 2008 - 19:36

+1 for this patch

fixed the error for me.

rtbc baby. ;)

#3

Konstantin_by - November 17, 2008 - 11:17

How to apply patch?

#4

greggles - November 17, 2008 - 16:22

@Konstantin_by - http://drupal.org/node/60108

#5

kenorb - March 30, 2009 - 12:13
Status:needs review» postponed (maintainer needs more info)

But this patch doing nothing. $array and $user are not updated anywhere, so it not make sense to make them referenceable.
The error is related to 4th argument what's set in latest snapshot.

 
 

Drupal is a registered trademark of Dries Buytaert.