#34009 [NEW]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
From: ast at gmx dot ch
Operating system: Gentoo Linux
PHP version: 4.4.0
PHP Bug Type: Scripting Engine problem
Bug description: PHP 4.4.0 shows on some platforms a return by reference Notice,but it
shouldn't
Description:
------------
Abstract:
-------------------
PHP 4.4.0 shows a "Notice: Only variable references should be returned by
reference in ..." Notice when it shouldn't.
The bug can only be reproduced with PHP 4.4.0. And it can only be
reproduced on a few systems, on most it returns the expected result (all
test platforms had error_reporting(E_ALL);).
Furthermore, code that seems to be equivalent doesn't result in a Notice.
And two different systems with almost the same setup don't show the same
results.
I couldn't isolate the bug further than this. Maybe it's a compile options
issue, maybe it has to do with the scope of variables, I don't know.
Disclaimer:
-------------------
You may think this is another bogus bug report for the return-by-reference
/ assign-by-reference / pass-by-reference Notices in PHP 4.4.0.
But I'm quite sure it isn't. I've patched our framework and wrote some
recommendations on how to code the right way:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=32907
. But you don't need to follow this link. I just want to point out that
this is a real issue.
Details:
-------------------
Please take a look at the reproduce script.
Reproduce code:
---------------
http://dev.nei.ch/bugs/php440_notice_bug/php440_notice_bug_on_certain_platforms.phps
Expected result:
----------------
Expected result:
----------------
PHP Version is: 4.4.0
no NOTICEs
Actual result:
--------------
Actual result:
--------------
php version is: 4.4.0
Notice: Only variable references should be returned by reference in
php440_notice_bug_on_certain_platforms.php on line 23
--
Edit bug report at http://bugs.php.net/?id=34009&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34009&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34009&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34009&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34009&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34009&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34009&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34009&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34009&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34009&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34009&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34009&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34009&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34009&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34009&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34009&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34009&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34009&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34009&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34009&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34009&r=mysqlcfg
Thread (19 messages)
- ast at gmx dot ch
- ast at gmx dot ch#34009 [Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- tony2001@php.net#34009 [Opn->Fbk]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Fbk->Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- tony2001@php.net#34009 [Opn->Fbk]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Fbk->Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- tony2001@php.net#34009 [Opn->Fbk]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Fbk->Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- sniper@php.net#34009 [Opn->Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- mgf@php.net#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- mgf@php.net#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- ast at gmx dot ch#34009 [Bgs->Opn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- sniper@php.net#34009 [Opn->Asn]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't
- pollita@php.net#34009 [Asn->Bgs]: PHP 4.4.0 shows on some platforms a return by reference Notice,but it shouldn't