summaryrefslogtreecommitdiff
path: root/ext/libxml/libxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/libxml/libxml.c')
-rw-r--r--ext/libxml/libxml.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c
index 7471065494..15ef274ee4 100644
--- a/ext/libxml/libxml.c
+++ b/ext/libxml/libxml.c
@@ -662,8 +662,9 @@ is_string:
}
} else if (Z_TYPE(retval) != IS_NULL) {
/* retval not string nor resource nor null; convert to string */
- convert_to_string(&retval);
- goto is_string;
+ if (try_convert_to_string(&retval)) {
+ goto is_string;
+ }
} /* else is null; don't try anything */
}