From: marcus at gooseflesh dot de Operating system: Windows 2000 PHP version: 4.3.2 PHP Bug Type: Documentation problem Bug description: ftruncate wrong return value
Description: ------------ Hello folks, Of some reasons the return value of ftruncate($handle, $size) is of type int not of type bool. Is there a general reason that the half of the file functions return true and false as int and the other half true and false as bool ??? Marcus Wilhelm PHP is the best :)) Reproduce code: --------------- $handle = fopen("existing.file", "r+"); $return = ftruncate($handle, 17); if ( $return === true ) // does not match { echo "truncate ok, return value is bool"; } if ( $return == true ) // does match { echo "truncate ok, return value is bool or int"; } if ( $return == 1 ) // does match { echo "truncate ok, return value is int"; } Expected result: ---------------- the return value of ftruncate should be of type bool not of type int. -- Edit bug report at http://bugs.php.net/?id=24162&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24162&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24162&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24162&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24162&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24162&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24162&r=support Expected behavior: http://bugs.php.net/fix.php?id=24162&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24162&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24162&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24162&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24162&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24162&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24162&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24162&r=gnused -- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php