From: andrea at 3site dot it
Operating system: Windows XP SP2
PHP version: 5.1.0RC1
PHP Bug Type: Arrays related
Bug description: Send an array to a class method change its value
Description:
------------
While I interact with another class and I call a method sending a run-time
created array its values (integer value) is wrong.
This happen when I work with a lot of $_POST variables (I don't know if
this is a problem but without this bug is absent ...)
Reproduce code:
---------------
// code ....
// NOTE: I develop with error_reporting E_ALL
// and at this point is all OK
// die(print_r($artist_id, true));
// produce Array ( [0] => 1 [1] => image )
$GLOBALS['SES']->register('__artist_modify__', array($artist_id[0],
$artist_id[1]));
// external class, that work without problems ...
// on $GLOBALS['SES'] register method
function register($name, $value) {
die(print_r($value, true));
// produce Array ( [0] => 86724468 [1] => image )
}
Expected result:
----------------
Expected ? ... I send an array with two keys ... so what's up ?
Actual result:
--------------
// this code works perfectly ...
function accept($name, $value) {
die(print_r($value, true));
}
$artist_id = array(1, 'image');
accept('__artist_modify__', array($artist_id[0], $artist_id[1]));
--
Edit bug report at http://bugs.php.net/?id=34620&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34620&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34620&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34620&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34620&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34620&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34620&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34620&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34620&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34620&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34620&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34620&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34620&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34620&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34620&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34620&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34620&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34620&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34620&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34620&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34620&r=mysqlcfg