Bug #16757: setting server_name to NULL doesn't work

From: Date: Tue, 23 Apr 2002 15:20:25 +0000
Subject: Bug #16757: setting server_name to NULL doesn't work
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5671@lists.php.net to get a copy of this message
From: msisolak@yahoo.com Operating system: Windows 2000 PHP version: 4.2.0 PHP Bug Type: COM related Bug description: setting server_name to NULL doesn't work In 4.2 you can no longer set server_name to NULL (which you need to do if you just want to set the codepage). The problem is the code that was added to 4.2 to process server_name as an ARRAY. In 4.1.2 the code looked like this (COM.c, line 486): if (server_name != NULL) { if (Z_TYPE_P(server_name) == IS_NULL) { server_name = NULL; } else { if (!INI_INT("com.allow_dcom")) { php_error(E_WARNING, "DCOM is disabled"); RETURN_FALSE; } else { convert_to_string_ex(&server_name); } } } In the 4.2.0 COM.c, the new flags variable set and IS_ARRAY check was added before the IS_NULL check, instead of inside the else branch - thus flags is set to remote invocation, even if server_name is NULL. To fix this I moved everything below "if (server_name != NULL)" and above "if (Z_TYPE_P(server_name) == IS_NULL) {" to after "} else {". -- Edit bug report at http://bugs.php.net/?id=16757&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16757&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16757&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16757&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16757&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16757&r=support Expected behavior: http://bugs.php.net/fix.php?id=16757&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16757&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16757&r=submittedtwice

« previous php.bugs (#5671) next »