Doc #60464 [Csd->Bgs]: fseek documention incorrect

From: Date: Thu, 08 Dec 2011 00:10:14 +0000
Subject: Doc #60464 [Csd->Bgs]: fseek documention incorrect
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7620@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60464&edit=1 ID: 60464 Updated by: frozenfire@php.net Reported by: df1986 at aol dot com Summary: fseek documention incorrect -Status: Closed +Status: Bogus Type: Documentation Problem Package: Filesystem function related Operating System: All PHP Version: Irrelevant Assigned To: frozenfire Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2011-12-08 00:09:46] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=320623 Log: Reverting previous commit, which was mistaken. Bug #60464. ------------------------------------------------------------------------ [2011-12-08 00:05:56] frozenfire@php.net Yeah, you're actually right mfonda. Looking back at the sources, that actually makes more sense. Normally when I see only two return statements it's a "false on failure" situation, but in this case I suppose the RETURN_LONG would provide different results based on the internal function it calls. I'll revert my change. ------------------------------------------------------------------------ [2011-12-07 23:56:49] mfonda@php.net I think the docs were actually correct here. fseek will return -1 if the seek fails, and 0 upon success. It will return false in the case of invalid arguments, such as the example below. ------------------------------------------------------------------------ [2011-12-07 23:34:11] frozenfire@php.net This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. By the way, don't use json_encode for debugging. It's bound to screw you up. Use var_dump instead. ------------------------------------------------------------------------ [2011-12-07 23:33:32] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&revision=320620 Log: Fixed return value. Closed bug #60464. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60464 -- Edit this bug report at https://bugs.php.net/bug.php?id=60464&edit=1

« previous php.doc.bugs (#7620) next »