@@ -411,45 +411,46 @@ static void set_output_options(php_output_options* options, zval* output_opts)
411
411
}
412
412
}
413
413
414
- /* encoding code set */
415
- if ((val = zend_hash_str_find (Z_ARRVAL_P (output_opts ), ENCODING_KEY , ENCODING_KEY_LEN )) != NULL ) {
416
- if (Z_TYPE_P (val ) == IS_STRING ) {
417
- options -> xmlrpc_out .xml_elem_opts .encoding = estrdup (Z_STRVAL_P (val ));
418
- }
414
+ }
415
+
416
+ /* encoding code set */
417
+ if ((val = zend_hash_str_find (Z_ARRVAL_P (output_opts ), ENCODING_KEY , ENCODING_KEY_LEN )) != NULL ) {
418
+ if (Z_TYPE_P (val ) == IS_STRING ) {
419
+ options -> xmlrpc_out .xml_elem_opts .encoding = estrdup (Z_STRVAL_P (val ));
419
420
}
421
+ }
420
422
421
- /* escaping options */
422
- if ((val = zend_hash_str_find (Z_ARRVAL_P (output_opts ), ESCAPING_KEY , ESCAPING_KEY_LEN )) != NULL ) {
423
- /* multiple values allowed. check if array */
424
- if (Z_TYPE_P (val ) == IS_ARRAY ) {
425
- zval * iter_val ;
426
-
427
- options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_no_escaping ;
428
-
429
- ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (val ), iter_val ) {
430
- if (Z_TYPE_P (iter_val ) == IS_STRING && Z_STRVAL_P (iter_val )) {
431
- if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_CDATA )) {
432
- options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_cdata_escaping ;
433
- } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_NON_ASCII )) {
434
- options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_non_ascii_escaping ;
435
- } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_NON_PRINT )) {
436
- options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_non_print_escaping ;
437
- } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_MARKUP )) {
438
- options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_markup_escaping ;
439
- }
423
+ /* escaping options */
424
+ if ((val = zend_hash_str_find (Z_ARRVAL_P (output_opts ), ESCAPING_KEY , ESCAPING_KEY_LEN )) != NULL ) {
425
+ /* multiple values allowed. check if array */
426
+ if (Z_TYPE_P (val ) == IS_ARRAY ) {
427
+ zval * iter_val ;
428
+
429
+ options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_no_escaping ;
430
+
431
+ ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (val ), iter_val ) {
432
+ if (Z_TYPE_P (iter_val ) == IS_STRING && Z_STRVAL_P (iter_val )) {
433
+ if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_CDATA )) {
434
+ options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_cdata_escaping ;
435
+ } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_NON_ASCII )) {
436
+ options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_non_ascii_escaping ;
437
+ } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_NON_PRINT )) {
438
+ options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_non_print_escaping ;
439
+ } else if (!strcmp (Z_STRVAL_P (iter_val ), ESCAPING_VALUE_MARKUP )) {
440
+ options -> xmlrpc_out .xml_elem_opts .escaping |= xml_elem_markup_escaping ;
440
441
}
441
- } ZEND_HASH_FOREACH_END ();
442
- /* else, check for single value */
443
- } else if (Z_TYPE_P (val ) == IS_STRING ) {
444
- if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_CDATA )) {
445
- options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_cdata_escaping ;
446
- } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_NON_ASCII )) {
447
- options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_non_ascii_escaping ;
448
- } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_NON_PRINT )) {
449
- options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_non_print_escaping ;
450
- } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_MARKUP )) {
451
- options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_markup_escaping ;
452
442
}
443
+ } ZEND_HASH_FOREACH_END ();
444
+ /* else, check for single value */
445
+ } else if (Z_TYPE_P (val ) == IS_STRING ) {
446
+ if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_CDATA )) {
447
+ options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_cdata_escaping ;
448
+ } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_NON_ASCII )) {
449
+ options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_non_ascii_escaping ;
450
+ } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_NON_PRINT )) {
451
+ options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_non_print_escaping ;
452
+ } else if (!strcmp (Z_STRVAL_P (val ), ESCAPING_VALUE_MARKUP )) {
453
+ options -> xmlrpc_out .xml_elem_opts .escaping = xml_elem_markup_escaping ;
453
454
}
454
455
}
455
456
}
0 commit comments