# This somehow got lost and was then readded by Andi in 1.258 at the wrong
# position. Obviously we need to separate the argument first and convert it
# afterwards as done in 5.0.*.
*pl = Z_STRLEN_PP(arg);
break;
case IS_OBJECT: {
+ SEPARATE_ZVAL_IF_NOT_REF(arg);
if (Z_OBJ_HANDLER_PP(arg, cast_object)
&& Z_OBJ_HANDLER_PP(arg, cast_object)(*arg, *arg, IS_STRING, 0 TSRMLS_CC) == SUCCESS) {
- SEPARATE_ZVAL_IF_NOT_REF(arg);
*pl = Z_STRLEN_PP(arg);
*p = Z_STRVAL_PP(arg);
break;