File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -1298,7 +1298,6 @@ php_zstd_output_handler_load_dict(php_zstd_context *ctx)
12981298 char * dict = PHP_ZSTD_G (output_compression_dict );
12991299
13001300 if (!dict || strlen (dict ) <= 0 ) {
1301- PHP_ZSTD_G (compression_coding ) &= ~PHP_ZSTD_ENCODING_DCZ ;
13021301 return NULL ;
13031302 }
13041303
@@ -1308,7 +1307,6 @@ php_zstd_output_handler_load_dict(php_zstd_context *ctx)
13081307 NULL , context );
13091308 if (!stream ) {
13101309 ZSTD_WARNING ("could not open dictionary stream: %s" , dict );
1311- PHP_ZSTD_G (compression_coding ) &= ~PHP_ZSTD_ENCODING_DCZ ;
13121310 return NULL ;
13131311 }
13141312
@@ -1322,7 +1320,6 @@ php_zstd_output_handler_load_dict(php_zstd_context *ctx)
13221320 php_stream_close (stream );
13231321
13241322 if (!data ) {
1325- PHP_ZSTD_G (compression_coding ) &= ~PHP_ZSTD_ENCODING_DCZ ;
13261323 return NULL ;
13271324 }
13281325
@@ -1360,7 +1357,6 @@ php_zstd_output_handler_load_dict(php_zstd_context *ctx)
13601357 } else {
13611358 php_error_docref (NULL , E_WARNING ,
13621359 "zstd: not found available-dictionary" );
1363- PHP_ZSTD_G (compression_coding ) &= ~PHP_ZSTD_ENCODING_DCZ ;
13641360 zend_string_release (data );
13651361 data = NULL ;
13661362 }
@@ -1378,6 +1374,9 @@ static zend_result php_zstd_output_handler_context_start(php_zstd_context *ctx)
13781374 }
13791375
13801376 zend_string * dict = php_zstd_output_handler_load_dict (ctx );
1377+ if (dict == NULL ) {
1378+ PHP_ZSTD_G (compression_coding ) &= ~PHP_ZSTD_ENCODING_DCZ ;
1379+ }
13811380 if (!PHP_ZSTD_G (compression_coding )) {
13821381 return FAILURE ;
13831382 }
You can’t perform that action at this time.
0 commit comments