From:             sven at leon dot uia dot mx
Operating system: All (redhat 90)
PHP version:      5.0.0b1 (beta1)
PHP Bug Type:     *Programming Data Structures
Bug description:  bad one? mixingup of array / $this-> in memory

Description:
------------
In a class I send an array $test as a parameter to a protected function.
Then, if I try to access that array in any way in that function, suddenly
the $this object contains the data of that array $test (!)

Reproduce code:
---------------
Sorry, cant make a short-and-clear reproducing code, but here I have a
small code sample that actually caused the problem: (note that
$this->params["source"] _IS_ an array)

protected function get_body($css){

echo "B0 (";
print_r($this);
echo ")<br>";
flush();

  $retval="";
  while(list($key, $cell_data)=each($this->params["source"])){

  echo "B1 (";
  print_r($this);
  echo ")<br>";
  flush();



Expected result:
----------------
I will try to get a .zip together with the classes that seem to cause this
problem.

Actual result:
--------------
B0 (table_key_value_a Object ( [params:protected] => Array ( [source] =>
Array ( [crc] => mBjsS50UkhAnxjWp [sid] => 75 [test_site] =>
75,mBjsS50UkhAnxjWp ) [col headers] => Array ( [0] => Key [1] => Value )
[table header] => HTTP VARIABLES [css prefix] => debug [table header
extra] => align='center' ) ) )

B1 (table_key_value_a Object ( [cell_data] => mBjsS50UkhAnxjWp [key] =>
crc ) )

-- 
Edit bug report at http://bugs.php.net/?id=25957&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25957&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25957&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25957&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25957&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25957&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25957&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25957&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25957&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25957&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25957&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25957&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25957&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25957&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25957&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25957&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25957&r=float

Reply via email to