Skip to content

Commit 7ef01f0

Browse files
author
Ilia Alshanetsky
committed
Reverting previous patch (not necessary, thanks Pollita ;) )
1 parent 425882e commit 7ef01f0

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ext/standard/streamsfuncs.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,10 +669,10 @@ static int parse_context_options(php_stream_context *context, zval *options)
669669

670670
static int parse_context_params(php_stream_context *context, zval *params)
671671
{
672-
int ret = FAILURE;
672+
int ret = SUCCESS;
673673
zval **tmp;
674674

675-
if ((ret = zend_hash_find(Z_ARRVAL_P(params), "notification", sizeof("notification"), (void**)&tmp)) == SUCCESS) {
675+
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "notification", sizeof("notification"), (void**)&tmp)) {
676676

677677
if (context->notifier) {
678678
php_stream_notification_free(context->notifier);
@@ -684,14 +684,10 @@ static int parse_context_params(php_stream_context *context, zval *params)
684684
context->notifier->ptr = *tmp;
685685
ZVAL_ADDREF(*tmp);
686686
}
687-
if ((ret = zend_hash_find(Z_ARRVAL_P(params), "options", sizeof("options"), (void**)&tmp)) == SUCCESS) {
687+
if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "options", sizeof("options"), (void**)&tmp)) {
688688
parse_context_options(context, *tmp);
689689
}
690-
691-
if (ret != SUCCESS) {
692-
php_stream_context_free(context);
693-
}
694-
690+
695691
return ret;
696692
}
697693

0 commit comments

Comments
 (0)