summaryrefslogtreecommitdiff
path: root/ext/com/COM.c
diff options
context:
space:
mode:
authorHarald Radi <phanto@php.net>2002-04-27 10:17:46 +0000
committerHarald Radi <phanto@php.net>2002-04-27 10:17:46 +0000
commita380af2247a012d5a7ec188201f07de53e6373e1 (patch)
treec9bc10c1918c19c8c70061abe063c1220f0ae989 /ext/com/COM.c
parent6147e1e72097cbae8a1240863f814c15ec9d3f10 (diff)
downloadphp-git-a380af2247a012d5a7ec188201f07de53e6373e1.tar.gz
don't set CLSCTX_REMOTE_SERVER if NULL is passed as servername
Diffstat (limited to 'ext/com/COM.c')
-rw-r--r--ext/com/COM.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/ext/com/COM.c b/ext/com/COM.c
index 29cc740455..58ab660650 100644
--- a/ext/com/COM.c
+++ b/ext/com/COM.c
@@ -501,14 +501,11 @@ PHP_FUNCTION(com_load)
}
if (server_name != NULL) {
- /* if a server is passed, one obviously wants to instanciate a
- * remote server
- */
- flags = CLSCTX_REMOTE_SERVER;
-
/* What is server name? A String or an array? */
- if (Z_TYPE_P(server_name) == IS_ARRAY) {
+ if (Z_TYPE_P(server_name) == IS_NULL) {
+ server_name = NULL;
+ } else if (Z_TYPE_P(server_name) == IS_ARRAY) {
pval **tmp;
/* DAB: 22 Sept 2001 */
/* Aha - we have a number of possible */
@@ -568,14 +565,12 @@ PHP_FUNCTION(com_load)
convert_to_long_ex(tmp);
flags = (CLSCTX) Z_LVAL_PP(tmp);
}
- }
- 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 {
+ flags = CLSCTX_REMOTE_SERVER;
convert_to_string_ex(&server_name);
}
}