Index: ext/standard/string.c =================================================================== RCS file: /repository/php-src/ext/standard/string.c,v retrieving revision 1.445.2.14.2.69.2.22 diff -u -p -r1.445.2.14.2.69.2.22 string.c --- ext/standard/string.c 27 May 2008 10:29:33 -0000 1.445.2.14.2.69.2.22 +++ ext/standard/string.c 9 Jun 2008 08:41:54 -0000 @@ -2233,12 +2233,15 @@ PHP_FUNCTION(substr_replace) } if (Z_TYPE_PP(str) != IS_ARRAY) { + SEPARATE_ZVAL(str); convert_to_string_ex(str); } if (Z_TYPE_PP(repl) != IS_ARRAY) { + SEPARATE_ZVAL(repl); convert_to_string_ex(repl); } if (Z_TYPE_PP(from) != IS_ARRAY) { + SEPARATE_ZVAL(from); convert_to_long_ex(from); }