phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Phpgroupware-developers] phpgw commits


From: Kai Hofmann
Subject: RE: [Phpgroupware-developers] phpgw commits
Date: Mon, 9 May 2005 08:58:14 +0200

Hi Chriss,

> Is this for HEAD or .16?  what modules does it affect?

its for HEAD only, I will not touch 0.9.16, except the core team decides
that
I should do these things there also.
All modules have been affected.

> #1 if a function is defined with references and a call passes by
> reference too, what happens?  

Unknown, but I found this within the code and removed the reference fom the
call.
Best would be when the reference in the call would be ignored, because it is
deprecated.

> I'm thinking 3rd party code here, I'm
> sure you'll do a thorough job but you don't have access to everything
> that uses phpgw code.

Thats right, but all changes have been done in head only, head is for
development,
so this is a problem of the developer of third party code.
But here is a small Test script including Results:

<?php
  function test(&$param1,&$param2)
  {
          ++$param2;
          echo ':' . $param1 . ':' . $param2 . ":<br />\n";

  }

  $strpara = 'test';
  $numpara = 0;
  test($strpara,$numpara);
  echo $numpara . ":<br />\n";
  test(&$strpara,&$numpara);
  echo $numpara . ":<br />\n";
?>

Running under php 4.3.11 and 5.0.4 produces the correct results!
So you don need to worry.

> #2 if a function is changed to use references when the calling code
> doesn't expect it, what kinds of wierd things will happen?

Depends on the functions body, when the body modifies the variables content,
this modification will be visible to the caller.

> Call-time pass-by-reference should have been gone long ago, but it's
> not and this has the potential to be a major change.

>From head it has now been completly removed, so please do not add new code
of this type ;-)

> Is anyone running "allow_call_time_pass_reference = Off" without
> problems?  If so, what phpgw features are you using?

I think its not a question of missing features, more of malworked code.
What I can say from the code examination is, that the color alternation of
tables might not work. (for example).


Greetings

  Kai




reply via email to

[Prev in Thread] Current Thread [Next in Thread]