Wez Furlong wrote:
If you've spotted a behaviour change, open a new bug with a short
self-contained reproducing script.  I suspect some kind of engine bug
here, because what you've described doesn't make sense :)

That warning about the length comes from this code in the fread function:

    len = Z_LVAL_PP(arg2);
    if (len <= 0) {
        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter
must be greater than 0");
        RETURN_FALSE;
    }

So either you are passing in something that evaluates as 0 (or less),
or something is corrupting memory and breaking the length value by the
time it reaches fread().

In the attempt to find a short reproducing test script, I determined that the warning was caused by an earlier iteration through the method that uses fread. So, the warning was valid (0 was being passed in). What this means, however, is that the script is in fact simply failing to read in the requested amount with no warning at all. I'll have a test script shortly for the bug report.

Greg

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to