diff options
Diffstat (limited to 'ext/intl/timezone/timezone_class.cpp')
-rw-r--r-- | ext/intl/timezone/timezone_class.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp index aabb0f3f55..695cc7d3ea 100644 --- a/ext/intl/timezone/timezone_class.cpp +++ b/ext/intl/timezone/timezone_class.cpp @@ -179,7 +179,10 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone, UnicodeString id, gottenId; UErrorCode status = U_ZERO_ERROR; /* outside_error may be NULL */ - convert_to_string_ex(zv_timezone); + if (!try_convert_to_string(zv_timezone)) { + zval_ptr_dtor_str(&local_zv_tz); + return NULL; + } if (intl_stringFromChar(id, Z_STRVAL_P(zv_timezone), Z_STRLEN_P(zv_timezone), &status) == FAILURE) { spprintf(&message, 0, "%s: Time zone identifier given is not a " |