[php-maint] Bug#647641: [php5] call-time pass-by-reference does not generate notice/error

Filipus Klutiero chealer at gmail.com
Fri Nov 4 19:47:08 UTC 2011

Package: php5
Version: 5.3.8-2
Severity: normal

Call to functions with arguments passed by reference are deprecated 
since PHP 5.3. However, these do not trigger a notice/error. There is an 
option to allow these calls without causing notices 
(allow_call_time_pass_reference) but it is not enabled here.

I created a test script for that which I'm attaching. I'm attaching its 
output and errors too. The split() call simply confirms that the problem 
is not that E_DEPRECATED is not set.

I asked other people on ##php to test and they reported their PHP 
generated notices for the pass-by-reference call script, as expected. 
These 2 people pasted their results, which may still be available on 
http://codepad.viper-7.com/303dgf and http://codepad.viper-7.com/iiYsph
Note that these were running an earlier version of the script. Their 
output contains:

> *Deprecated*: Call-time pass-by-reference has been deprecated; If you 
> would like to pass it by reference, modify the declaration of foo(). 
> If you would like to enable call-time pass-by-reference, you can set 
> allow_call_time_pass_reference to true in your INI file in 
> */code/iiYsph* on line *8*

I tested on a squeeze server and reproduced the issue. I also asked on 
#debian and another user reproduced also using squeeze.

--- System information. ---
Architecture: i386
Kernel: Linux 3.0.0-2-amd64

Debian Release: wheezy/sid
990 testing security.debian.org
990 testing ftp.ca.debian.org
500 unstable ftp.ca.debian.org
1 experimental ftp.ca.debian.org

--- Package information. ---
Depends (Version) | Installed
libapache2-mod-php5 (>= 5.3.8-2) | 5.3.8-2
OR libapache2-mod-php5filter (>= 5.3.8-2) |
OR php5-cgi (>= 5.3.8-2) |
OR php5-fpm (>= 5.3.8-2) |
php5-common (>= 5.3.8-2) | 5.3.8-2

Package's Recommends field is empty.

Package's Suggests field is empty.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20111104/6834b3d7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callTimeRefNoticeTest.php
Type: application/x-httpd-php
Size: 220 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20111104/6834b3d7/attachment-0001.php>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: callTimeRefNoticeTestStderr.txt
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20111104/6834b3d7/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: callTimeRefNoticeTestStdout.txt
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-maint/attachments/20111104/6834b3d7/attachment-0003.txt>

More information about the pkg-php-maint mailing list