From:             Mentaloid at hotmail dot com
Operating system: Linux 2.4.22 SMP
PHP version:      4.3.3
PHP Bug Type:     Scripting Engine problem
Bug description:  func_get_arg(),func_get_args() fail to give value.

Description:
------------
When passing a string containing 8 bytes that represents hexadecimal data
such as 'ffffffff' to a user function that utilizes func_get_arg() or
func_get_arg(), values become unavailable (zero length string) while
func_num_args() will show that the value existed.

Configure Line "'./configure' '--with-mysql=/usr/local/mysql' '--with-ftp'
'--enable-sockets' '--with-apxs2=/usr/local/apache2/bin/apxs'"

Apache 2.0, standard config + frontpage extensions. Frontpage extensions
not active on this virtualhost.
Standard INI, with the exception of ASP TAGS.

PHPInfo page can be viewed @
http://tko.mentadd.com/ServerControl/control/xxPhpInfo.php

Reproduce code:
---------------
function binlogdata() {
        global $DB, $scbinlogtable;
        $args = func_get_args();
        $results = '';
        foreach ($args as $key => $value) {
                if ($key == 0) {
                        $results = $results.'<API>'.$value.'</API>';
                } else {
                                $results = 
$results.'<PARM'.$key.'>'.$value.'</PARM'.$key.'>';
                }
        }
        return $results;
}

$fetch['test1'] = 'thisisok';
$fetch['test2'] = 'ffffffff';

echo binlogdata('PlayerLimit',$fetch['test1'],$fetch['test2']);



Expected result:
----------------
// The expected result is
        "<API>PlayerLimit</API><PARM1>thisisok</PARM1><PARM2>ffffffff</PARM2>";


Actual result:
--------------
// The actual result is
        "<API>PlayerLimit</API><PARM1>thisisok</PARM1><PARM2></PARM2>";


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

Reply via email to