ID:               32789
 User updated by:  php at thoftware dot de
 Reported By:      php at thoftware dot de
 Status:           Bogus
 Bug Type:         Arrays related
 Operating System: *
 PHP Version:      4.3.11
 New Comment:

I don't know, who is deleting my submissions, but I think it would be
better to delete the whole thread instead of deleting only some
submissions which makes the references in other submissions nonsense. I
accept that you don't accept this as a bug and I wont post any new found
bugs as it seems to be easyer to handle with bugs than to get a bug
reported. Nice job.


Previous Comments:
------------------------------------------------------------------------

[2005-04-26 14:08:02] php at thoftware dot de

Looks like nobody is listening here - sigh. After discussing this in
another forum, we are still sure this _is_ a bug. As I was ordered not
to set this bug back to open we are trying to start over with a new
bug-report in a new location (it's not really a bug in array_pop() but
something in the reference system). Someone with a hopefully better
ability to explain where the bug is located will post it and I will add
a link to it afterwards - hope that's o.k.

------------------------------------------------------------------------

[2005-04-25 22:18:30] php at thoftware dot de

Maybe this one from Waq explains it in a better way why I think it's a
bug: http://www.php.de/viewtopic.php?p=252840#252840 (it's from a
german forum where the people tried to understand what I tried to
say).

I didn't ask for help, the script that crashed because of this bogus
bug was already fixed when I submitted this. Sorry for taking your
time, surely PHP acts perfect in this case :-(

P.S. Why are you deleting your comments? Do you think it makes it even
more bogus when it looks like I'm talking to myself? Not nice :-(

------------------------------------------------------------------------

[2005-04-23 09:05:35] [EMAIL PROTECTED]

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

bugs is not a helpdesk - please leave this as bogus and ask on
php-general.

------------------------------------------------------------------------

[2005-04-22 15:56:37] php at thoftware dot de

Sorry again, maybe I should stop coding %-(, this is the real 

Actual result:
--------------
it's forever mine
noone else should be able to change it
it's mine
this is my cache

for the example directly above ...

------------------------------------------------------------------------

[2005-04-22 15:54:09] php at thoftware dot de

Sorry, the fatal error results from the result of cache() being an
empty array (but that may be another bug?), correct code should be:

Reproduce code:
---------------
class foobar {
  var $cache = array();
  function cache() {
    if (!count($this->cache)) {
      $this->cache[1] = array(
        'this is my cache<br>',
        'it\'s mine<br>',
        'noone else should be able to change it<br>',
        'it\'s forever mine<br>',
      );
    }
    return($this->cache[1]);
  }
}
$foobar =& new foobar();
echo array_pop($foobar->cache());
echo array_pop($foobar->cache());
echo array_pop($foobar->cache());
echo array_pop($foobar->cache());

Expected result:
----------------
it's forever mine 
it's forever mine 
it's forever mine 
it's forever mine

Actual result:
--------------
Fatal error: Only variables can be passed by reference in ...

Using a static variable within the method will work like the example
using a plain function, using an object-variable will work like shown
above, even if you remove the '[1]'-part.

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/32789

-- 
Edit this bug report at http://bugs.php.net/?id=32789&edit=1

Reply via email to