[kwlug-disc] Your KWLUG web site account is at risk

Joe Wennechuk youcanreachmehere at hotmail.com
Thu Jan 20 16:54:24 EST 2011


As per our earlier talk,   I'm trying to better understand PHP, so when we see the &$ it is passing by value, and when it is $ it is passing by reference???, what prevents you from just changing the function call to the return call_user_function  what is it returning?



Joseph Wennechuk

________________




> Date: Thu, 20 Jan 2011 16:36:15 -0500
> From: john at netdirect.ca
> To: kwlug-disc at kwlug.org
> Subject: Re: [kwlug-disc] Your KWLUG web site account is at risk
> 
> ----- Original Message -----
> > On Thu, Jan 20, 2011 at 9:00 AM, John Van Ostrand < john at netdirect.ca
> > > wrote:
> > 
> > > Here is another thread documenting Drupal 6 and PHP 5.3
> > > compatibility:
> 
> In the case of why User view/edit doesn't work I have the answer. The call to hook_user is being made with an array of values when a list of scalars is taken by the function. Not only that the scalars are by reference.
> 
> In:
> 
> includes/module.inc:function module_invoke():
>     // $args is set to array($type, $edit, $user, $category)
>     // $function gets set to "user_user"
>     return call_user_func_array($function, $args);
> 
> But in:
> 
> modules/user/user.module the function is declared as:
> 
>    function user_user($type, &$edit, &$user, $category = NULL)
> 
> Since call_user_func is used the error is lost.
> 
> -- 
> John Van Ostrand 
> CTO, co-CEO 
> Net Direct Inc. 
> 564 Weber St. N. Unit 12, Waterloo, ON N2L 5C6 
> Ph: 866-883-1172 x5102 
> Fx: 519-883-8533 
> 
> Linux Solutions / IBM Hardware 
> 
> 
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20110120/864592e4/attachment.html>


More information about the kwlug-disc_kwlug.org mailing list