Req->Bug #55807 [Csd->ReO]: Wrong value for splFileObject::SKIP_EMPTY

From: Date: Thu, 09 Feb 2012 20:31:37 +0000
Subject: Req->Bug #55807 [Csd->ReO]: Wrong value for splFileObject::SKIP_EMPTY
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-167363@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55807&edit=1 ID: 55807 Updated by: rasmus@php.net Reported by: jgotti at modedemploi dot fr Summary: Wrong value for splFileObject::SKIP_EMPTY -Status: Closed +Status: Re-Opened -Type: Feature/Change Request +Type: Bug Package: SPL related Operating System: linux PHP Version: 5.3.8 Assigned To: colder Block user comment: N Private report: N New Comment: This fix was not correct. SKIP_EMPTY included READ_AHEAD on purpose. See Helly's original commit message: http://svn.php.net/viewvc?view=revision&revision=212726 This is now causing problems. See bug 61032 We need to either revert this, or change the logic to restore the original behaviour of SKIP_EMPTY Previous Comments: ------------------------------------------------------------------------ [2011-09-30 14:17:33] bjori@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. ------------------------------------------------------------------------ [2011-09-30 14:17:20] bjori@php.net Heh. Excellent point :) ------------------------------------------------------------------------ [2011-09-30 14:17:02] bjori@php.net Automatic comment from SVN on behalf of bjori Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=317501 Log: Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY) ------------------------------------------------------------------------ [2011-09-28 15:21:05] jgotti at modedemploi dot fr Description: ------------ isn't this weird that splFileObject::SKIP_EMPTY=6. I think this should be 4 and not 6 as setting splFileObject flag to SKIP_EMPTY will report flag splFileObject::READ_AHEAD to be set even if not intended to be set Test script: --------------- $fileObj = new SplFileObject('/tmp/test.txt'); $fileObj->setFlags(SplFileObject::SKIP_EMPTY); if( $fileObj->getFlags() & SplFileObject::READ_AHEAD ){//<-- should not pass here we didn't set READ_AHEAD flag echo "READ_AHEAD on"; } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55807&edit=1

« previous php.bugs (#167363) next »