summaryrefslogtreecommitdiff
path: root/ext/intl/calendar
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2018-07-02 17:03:50 +0300
committerDmitry Stogov <dmitry@zend.com>2018-07-02 17:03:50 +0300
commit091d77f28a78a700ce0e72457606e01ed696de83 (patch)
tree3167f9e6df3b4f4935c3cc0b5d65d421d472f2a3 /ext/intl/calendar
parent43aca3118ab011b878ec577904eafc18f86f69ae (diff)
downloadphp-git-091d77f28a78a700ce0e72457606e01ed696de83.tar.gz
Avoid magic method hash lookups
Diffstat (limited to 'ext/intl/calendar')
-rw-r--r--ext/intl/calendar/calendar_methods.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index 8c6aaed103..f5e0daf149 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -1141,7 +1141,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function(
Z_OBJCE_P(zv_arg), php_date_get_date_ce()))) {
object_init_ex(&zv_tmp, php_date_get_date_ce());
- zend_call_method_with_1_params(&zv_tmp, NULL, NULL, "__construct", NULL, zv_arg);
+ zend_call_method_with_1_params(&zv_tmp, NULL, &Z_OBJCE(zv_tmp)->constructor, "__construct", NULL, zv_arg);
zv_datetime = &zv_tmp;
if (EG(exception)) {
zend_object_store_ctor_failed(Z_OBJ(zv_tmp));
@@ -1257,7 +1257,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
/* Finally, instantiate object and call constructor */
object_init_ex(return_value, php_date_get_date_ce());
- zend_call_method_with_2_params(return_value, NULL, NULL, "__construct", NULL, &ts_zval, timezone_zval);
+ zend_call_method_with_2_params(return_value, NULL, &Z_OBJCE_P(return_value)->constructor, "__construct", NULL, &ts_zval, timezone_zval);
if (EG(exception)) {
intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_to_date_time: DateTime constructor has thrown exception",