php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19222 allow_call_time_pass_reference warnings
Submitted: 2002-09-04 01:19 UTC Modified: 2002-11-01 11:28 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: gs-bugs-php at gluelogic dot com Assigned:
Status: Closed Package: PEAR related
PHP Version: 4CVS-2002-09-04 OS: Linux 2.4.18
Private report: No CVE-ID: None
 [2002-09-04 01:19 UTC] gs-bugs-php at gluelogic dot com
There are more than a handful of places in the PEAR libraries where allow_call_time_pass_reference = Off will trigger warnings and then pass by value.  (These are PHP 4.2.2 libraries and I just checked php-latest as well)

Since call-time-pass-reference is deprecated, please correct the libraries distributed with PHP.  Thank you.

For a similar bug, please see:
http://bugs.php.net/bug.php?id=17732

-Glenn

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-29 00:09 UTC] gs-bugs-php at gluelogic dot com
Not sure if anyone will see this, but this bug is still present in 4.2.3.  Specifically, in 4.2.3 pear/HTML/Form.php line 325, if you remove the '&' from '&$default' things work fine with call_time_pass_reference=Off.  If you wish to preserve the reference passing, change line 303 "$default = ''" to "&$default"

Line 179 of pear/Mail/RFC822.php needs an @ sign in front of 'set_time_limit(30);' to quiet error messages when in safe mode (which doesn't allow use of set_time_limit())

Line 93 of pear/Net/SMTP.php includes 'Net/Socket.php' WHICH IS MISSING FROM THE SOURCE.  Where did Net/Socket.php go?
 [2002-11-01 08:39 UTC] mj@php.net
I removed the & in front of $default and also fixed the problem in RFC822.php.

Net_Socket has to be installed via "pear install Net_Socket" from your command line.

Do these changes fix all your problems?
 [2002-11-01 09:26 UTC] gs-bugs-php at gluelogic dot com
Yes, this fixes my problems. Thank you, kindly.

I did not notice any documentation about using "pear install" in the PHP 4.2.2 distribution, and as I had gone from RedHat RPM of 4.1.2 to a source compile of 4.2.2, Net/Socket.php just disappeared from my point of view.

Wouldn't it make sense to either distribute Net/Socket.php or to remove SMTP.php, too, which require it (and, of course, document how to add pear extensions to your install).

Again, thank you for fixing these problems.  Please close out this bug.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 31 19:01:27 2021 UTC