Index: main/streams/userspace.c =================================================================== RCS file: /repository/php-src/main/streams/userspace.c,v retrieving revision 1.31.2.3.2.3 diff -u -p -d -r1.31.2.3.2.3 userspace.c --- main/streams/userspace.c 15 Jan 2007 17:07:07 -0000 1.31.2.3.2.3 +++ main/streams/userspace.c 13 Feb 2007 12:57:35 -0000 @@ -759,6 +759,10 @@ static int php_userstreamop_seek(php_str retval = NULL; } + if (ret) { + return ret; + } + /* now determine where we are */ ZVAL_STRINGL(&func_name, USERSTREAM_TELL, sizeof(USERSTREAM_TELL)-1, 0); @@ -768,16 +772,20 @@ static int php_userstreamop_seek(php_str &retval, 0, NULL, 0, NULL TSRMLS_CC); - if (call_result == SUCCESS && retval != NULL && Z_TYPE_P(retval) == IS_LONG) + if (call_result == SUCCESS && retval != NULL && Z_TYPE_P(retval) == IS_LONG) { *newoffs = Z_LVAL_P(retval); - else - php_error_docref(NULL TSRMLS_CC, E_WARNING, \"%s::\" USERSTREAM_TELL \" is not implemented!\", - us->wrapper->classname); + ret = 0; + } else if (call_result == FAILURE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, \"%s::\" USERSTREAM_TELL \" is not implemented!\", us->wrapper->classname); + ret = -1; + } else { + ret = -1; + } - if (retval) + if (retval) { zval_ptr_dtor(&retval); - - return 0; + } + return ret; } /* parse the return value from one of the stat functions and store the