php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28278 flakey return by reference under certain circumstances
Submitted: 2004-05-04 23:11 UTC Modified: 2005-02-03 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jeff at opendbms dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.0.0RC2 OS: Linux 2.6.1-rc1
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-05-04 23:11 UTC] jeff at opendbms dot com
Description:
------------
While passing references every which way, I come to a point where I cannot get my processForm function to return a reference to an object member variable.

Pretty serious bug I think...

Reproduce code:
---------------
http://www.opendbms.com/test.phps

80 lines with comments, Ready to run.

Expected result:
----------------
I expect the output to look like this:

Request Object
(
    [attributes:private] => Array
        (
            [sequencelist] => Array
                (
                    [0] => Orders.ProductInfo
                    [1] => NewSequence1.New1
                )

        )

    [parameters:private] => Array
        (
            [sequence] => Orders.ProductInfo
        )

)
Request:Request Object
(
    [attributes:private] => Array
        (
            [sequencelist] => Array
                (
                    [0] => Orders.ProductInfo
                    [1] => NewSequence1.New1
                    [2] => NewSequence2.New2
                    [3] => NewSequence3.New3
                )

        )

    [parameters:private] => Array
        (
            [sequence] => Orders.ProductInfo
        )

)
Reference:Array
(
    [0] => Orders.ProductInfo
    [1] => NewSequence1.New1
    [2] => NewSequence2.New2
    [3] => NewSequence3.New3
)


Actual result:
--------------
Request Object
(
    [attributes:private] => Array
        (
            [sequencelist] => Array
                (
                    [0] => Orders.ProductInfo
                    [1] => NewSequence1.New1
                )

        )

    [parameters:private] => Array
        (
            [sequence] => Orders.ProductInfo
        )

)
Request:Request Object
(
    [attributes:private] => Array
        (
            [sequencelist] => Array
                (
                    [0] => Orders.ProductInfo
                    [1] => NewSequence1.New1
                    [2] => NewSequence2.New2
                )

        )

    [parameters:private] => Array
        (
            [sequence] => Orders.ProductInfo
        )

)
Reference:Array
(
    [0] => Orders.ProductInfo
    [1] => NewSequence1.New1
    [2] => NewSequence2.New2
    [3] => NewSequence3.New3
)

The Request object is missing the last element of the array, because it is no longer a reference at that point.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-26 04:52 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-02-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 19:01:29 2024 UTC