summaryrefslogtreecommitdiff
path: root/ext/soap/php_encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/soap/php_encoding.c')
-rw-r--r--ext/soap/php_encoding.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c
index b6225270e8..ffc23457be 100644
--- a/ext/soap/php_encoding.c
+++ b/ext/soap/php_encoding.c
@@ -1015,7 +1015,15 @@ static zval *to_zval_double(encodeTypePtr type, xmlNodePtr data)
Z_DVAL_P(ret) = dval;
break;
default:
- soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
+ if (strncasecmp((char*)data->children->content, "NaN", sizeof("NaN")-1) == 0) {
+ ZVAL_DOUBLE(ret, php_get_nan());
+ } else if (strncasecmp((char*)data->children->content, "INF", sizeof("INF")-1) == 0) {
+ ZVAL_DOUBLE(ret, php_get_inf());
+ } else if (strncasecmp((char*)data->children->content, "-INF", sizeof("-INF")-1) == 0) {
+ ZVAL_DOUBLE(ret, -php_get_inf());
+ } else {
+ soap_error0(E_ERROR, "Encoding: Violation of encoding rules");
+ }
}
} else {
soap_error0(E_ERROR, "Encoding: Violation of encoding rules");