|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-12 18:02 UTC] cataphract@php.net
-Assigned To:
+Assigned To: cataphract
[2011-06-05 23:57 UTC] iliaa@php.net
[2011-06-05 23:57 UTC] iliaa@php.net
-Status: Assigned
+Status: Closed
[2011-06-05 23:57 UTC] iliaa@php.net
[2012-04-18 09:50 UTC] laruence@php.net
[2012-07-24 23:41 UTC] rasmus@php.net
[2013-11-17 09:37 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 18:00:01 2025 UTC |
Description: ------------ This is such a minor "bug" which can easily be fixed with one minor change. The bzip stream for example, does not support seeking, however this is an "emulation" in main/streams/streams.c that allows the SEEK_CUR to work with positive values by just continue to read for the seek duration. The bug is if you use SEEK_CUR with a value of zero, a warning pops up saying seek is not supported. I know using a value of zero is perhaps wrong, but by changing line 1150 of main/streams/streams.c from: if (whence == SEEK_CUR && offset > 0) { to: if (whence == SEEK_CUR && offset >= 0) { then this warning does not appear, and everything works as expected. I have not tested this change, but it looks innocent enough. Until then I'm writing my PHP code with a if ($offset > 0) fseek($fp, $offset, SEEK_CUR); thanks.