- substr_replace(): call correct funcn for string conversion
authorRolland Santimano <rolland@php.net>
Fri, 30 Sep 2005 13:19:15 +0000 (13:19 +0000)
committerRolland Santimano <rolland@php.net>
Fri, 30 Sep 2005 13:19:15 +0000 (13:19 +0000)
ext/standard/string.c

index c9840a7d5f0d09706d4b1f2fe22bcff898542edf..e867e188d09398ac67280272defa06bb85250a10 100644 (file)
@@ -2800,11 +2800,11 @@ PHP_FUNCTION(substr_replace)
                        if (tmp_repl && Z_TYPE_PP(str) != Z_TYPE_PP(tmp_repl)) {
                                str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_PP(str), Z_TYPE_PP(tmp_repl));
                                if (str_type == (zend_uchar)-1) {
-                                       convert_to_explicit_type(str, IS_BINARY);
-                                       convert_to_explicit_type(tmp_repl, IS_BINARY);
+                                       convert_to_explicit_type_ex(str, IS_BINARY);
+                                       convert_to_explicit_type_ex(tmp_repl, IS_BINARY);
                                } else {
-                                       convert_to_explicit_type(str, str_type);
-                                       convert_to_explicit_type(tmp_repl, str_type);
+                                       convert_to_explicit_type_ex(str, str_type);
+                                       convert_to_explicit_type_ex(tmp_repl, str_type);
                                }
                        }
                        php_adjust_limits(str, &f, &l);
@@ -2881,11 +2881,11 @@ PHP_FUNCTION(substr_replace)
                        if (tmp_repl && Z_TYPE_PP(tmp_str) != Z_TYPE_PP(tmp_repl)) {
                                str_type = zend_get_unified_string_type(2 TSRMLS_CC, Z_TYPE_PP(tmp_str), Z_TYPE_PP(tmp_repl));
                                if (str_type == (zend_uchar)-1) {
-                                       convert_to_explicit_type(tmp_str, IS_BINARY);
-                                       convert_to_explicit_type(tmp_repl, IS_BINARY);
+                                       convert_to_explicit_type_ex(tmp_str, IS_BINARY);
+                                       convert_to_explicit_type_ex(tmp_repl, IS_BINARY);
                                } else {
-                                       convert_to_explicit_type(tmp_str, str_type);
-                                       convert_to_explicit_type(tmp_repl, str_type);
+                                       convert_to_explicit_type_ex(tmp_str, str_type);
+                                       convert_to_explicit_type_ex(tmp_repl, str_type);
                                }
                        }
                        php_adjust_limits(tmp_str, &f, &l);