From: dstarr at allofe dot net Operating system: Windows Server 2003 PHP version: 5.0.4 PHP Bug Type: Variables related Bug description: GLOBALS fails in encoded code
Description: ------------ Versions: Encoder: ZendSafeGuard-3[1].1.0e-Linux_glibc21-i386 Optimizer: ZendOptimizer-2.5.7-Windows-i386 PHP: php-5.0.4-Win32 Windows: Microsoft Windows Server 2003 SE Service Pack 1 IIS: Version 6.0 Cannot call a member function on an object that is in an array in the GLOBALS. Reproduce code: --------------- The code un-encoded works, but once it is encoded it stops working. function display_loading_popup($msg, $keep_open) { print_r($GLOBALS); $msg_id = $GLOBALS["MESSAGE_API"][1]->displayPopup($msg, MESSAGE_API_PATH, $keep_open); exit; flush(); return $msg_id; } display_loading_popup("Test", 0); Expected result: ---------------- Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [OS] => Windows_NT [PROCESSOR_ARCHITECTURE] => x86 [PROCESSOR_IDENTIFIER] => x86 Family 15 Model 4 Stepping 1, GenuineIntel [PROCESSOR_LEVEL] => 15 [PROCESSOR_REVISION] => 0401 [CONTENT_TYPE] => application/x-www-form-urlencoded [GATEWAY_INTERFACE] => CGI/1.1 ) [MESSAGE_API] => Array ( [0] => messageapi Object ( [id] => 0 [message] => {0} [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => Empty Message ) [title] => Message [imagePath] => ./ ) [1] => loadingmessage Object ( [id] => 1 [message] => {0} [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => Loading... ) [title] => Loading [imagePath] => ./ ) [2] => errormessage Object ( [id] => 2 [message] => {0} had an error. [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => An unknown item ) [title] => Error [imagePath] => ./ ) [3] => messageapi Object ( [id] => 4 [message] => <table width=100% border=0 cellspacing=0 cellpadding=0><tr><td nowrap>This is a test of a long error message.</td></tr><tr><td nowrap>Apparently there has been a mix up in the database.</td></tr><tr><td nowrap>All your personal information that we promised to keep secret has been mailed to all the other users for some unknown reason.</td></tr></table> [search] => Array ( ) [replace] => Array ( ) [title] => Message [imagePath] => ./ ) ) ) <div id="message42f7c4240790d" style="visibility:show; z-index:100; left:350px; top:100px; position:absolute;"><table class='messageapi-outer-table' border='0' cellpadding='0' cellspacing='0' width='100'><tr><td><table class='messageapi-border-table' border='2' cellpadding='0' cellspacing='0' width='100%'><tr><td width='100%'><table class='messageapi-inner-table' border='0' cellpadding='2' cellspacing='0' width='100%'><tr><td id='message42f7c4240790d-drag-bar' bgcolor='#0000cc' align='left' colspan='3'><a class='messageapi-title' href="#" onclick="ns4_start_move('message42f7c4240790d')">Loading</a></td></tr><tr><td colspan='3' width='100%' valign='middle' bgcolor='#dddddd' class='messageapi-message'><br><table width=100% cellspacing=0 cellpadding=0><tr><td nowrap class='loading-message'>Logging In.<BR>Please Wait.</td></tr></table><br> <br></td></tr></table></td></tr></table></td></tr></table></div> Actual result: -------------- Array ( [GLOBALS] => Array *RECURSION* [_ENV] => Array ( [OS] => Windows_NT [PROCESSOR_ARCHITECTURE] => x86 [PROCESSOR_IDENTIFIER] => x86 Family 15 Model 4 Stepping 1, GenuineIntel [PROCESSOR_LEVEL] => 15 [PROCESSOR_REVISION] => 0401 [GATEWAY_INTERFACE] => CGI/1.1 [REQUEST_METHOD] => POST ) [MESSAGE_API] => Array ( [0] => messageapi Object ( [id] => 0 [message] => {0} [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => Empty Message ) [title] => Message [imagePath] => ./ ) [1] => loadingmessage Object ( [id] => 1 [message] => {0} [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => Loading... ) [title] => Loading [imagePath] => ./ ) [2] => errormessage Object ( [id] => 2 [message] => {0} had an error. [search] => Array ( [0] => /\{0\}/ ) [replace] => Array ( [0] => An unknown item ) [title] => Error [imagePath] => ./ ) [3] => messageapi Object ( [id] => 4 [message] => <table width=100% border=0 cellspacing=0 cellpadding=0><tr><td nowrap>This is a test of a long error message.</td></tr><tr><td nowrap>Apparently there has been a mix up in the database.</td></tr><tr><td nowrap>All your personal information that we promised to keep secret has been mailed to all the other users for some unknown reason.</td></tr></table> [search] => Array ( ) [replace] => Array ( ) [title] => Message [imagePath] => ./ ) ) ) <br /> <b>Fatal error</b>: Call to a member function displaypopup() on a non-object in <b>c:\Inetpub\wwwroot\sped\common\messageapi\MessageAPI_functions.php</b> on line <b>25</b><br /> -- Edit bug report at http://bugs.php.net/?id=34043&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34043&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34043&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34043&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34043&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34043&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34043&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34043&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34043&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34043&r=support Expected behavior: http://bugs.php.net/fix.php?id=34043&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34043&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34043&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34043&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34043&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34043&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34043&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34043&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34043&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34043&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34043&r=mysqlcfg