summaryrefslogtreecommitdiff
path: root/ext/standard/math.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/math.c')
-rw-r--r--ext/standard/math.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/math.c b/ext/standard/math.c
index cefcd38769..840df9103e 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -1090,7 +1090,10 @@ PHP_FUNCTION(base_convert)
Z_PARAM_LONG(frombase)
Z_PARAM_LONG(tobase)
ZEND_PARSE_PARAMETERS_END();
- convert_to_string_ex(number);
+
+ if (!try_convert_to_string(number)) {
+ return;
+ }
if (frombase < 2 || frombase > 36) {
php_error_docref(NULL, E_WARNING, "Invalid `from base' (" ZEND_LONG_FMT ")", frombase);