From: Ilia Alshanetsky Date: Thu, 19 Jun 2003 21:04:43 +0000 (+0000) Subject: Reverting previous patch (not necessary, thanks Pollita ;) ) X-Git-Tag: RELEASE_1_0_2~137 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ef01f01b936e3a4ec12cab2c2a8e0047c396114;p=php Reverting previous patch (not necessary, thanks Pollita ;) ) --- diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index a6ceb96e5c..cf7635afda 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -669,10 +669,10 @@ static int parse_context_options(php_stream_context *context, zval *options) static int parse_context_params(php_stream_context *context, zval *params) { - int ret = FAILURE; + int ret = SUCCESS; zval **tmp; - if ((ret = zend_hash_find(Z_ARRVAL_P(params), "notification", sizeof("notification"), (void**)&tmp)) == SUCCESS) { + if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "notification", sizeof("notification"), (void**)&tmp)) { if (context->notifier) { php_stream_notification_free(context->notifier); @@ -684,14 +684,10 @@ static int parse_context_params(php_stream_context *context, zval *params) context->notifier->ptr = *tmp; ZVAL_ADDREF(*tmp); } - if ((ret = zend_hash_find(Z_ARRVAL_P(params), "options", sizeof("options"), (void**)&tmp)) == SUCCESS) { + if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "options", sizeof("options"), (void**)&tmp)) { parse_context_options(context, *tmp); } - - if (ret != SUCCESS) { - php_stream_context_free(context); - } - + return ret; }