Zend Framework

Zend_Http_Client throws a warning, when using 'php://output' as destination stream.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.1
  • Fix Version/s: 1.11.10
  • Component/s: Zend_Http_Client
  • Labels:
    None

Description

When using setStream() method of Zend_Http_Client for redirecting the output to 'php://output', a warning is thrown :

Warning: rewind() [function.rewind]: stream does not support seeking in ...\library\Zend\Http\Client.php on line 998

Here is the sample code :

$httpClient = new Zend_Http_Client();
$httpClient->setUri($myUri);
$httpClient->setMethod(Zend_Http_Client::GET);
$httpClient->setStream('php://output')->request();

Activity

Hide
François-Xavier MAURICARD added a comment -

Here is a patch for fixing this issue.

We simply test if the stream is seekable before doing the call to rewind().

Show
François-Xavier MAURICARD added a comment - Here is a patch for fixing this issue. We simply test if the stream is seekable before doing the call to rewind().
Hide
François-Xavier MAURICARD added a comment -

As I've attached a patch fixing the issue and nothing was done, is this issue will be fixed or not?

Show
François-Xavier MAURICARD added a comment - As I've attached a patch fixing the issue and nothing was done, is this issue will be fixed or not?
Hide
Enrico Zimuel added a comment -

Solved in trunk + unit test (commit 24336)

Show
Enrico Zimuel added a comment - Solved in trunk + unit test (commit 24336)
Hide
Enrico Zimuel added a comment -

Solved in branches/release-1.11 (commit 24337)

Show
Enrico Zimuel added a comment - Solved in branches/release-1.11 (commit 24337)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: