owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.38k stars 2.06k forks source link

Storage::file_put_content return wrong in PHPDoc - implementations have to be checked as well #15382

Closed DeepDiver1975 closed 8 years ago

DeepDiver1975 commented 9 years ago

see https://scrutinizer-ci.com/g/owncloud/core/inspections/6cf4248d-d123-438d-a243-6521856b1e86/issues/files/lib/private/files/storage/wrapper/encryption.php?status=new&orderField=issueCount&order=desc#inspectioncomment-699654580

@icewind1991

PVince81 commented 9 years ago

I see that file_put_contents returns an int instead of bool: https://github.com/owncloud/core/blob/master/lib/private/files/storage/wrapper/encryption.php#L202

Also I'm not sure if it's correct to return false if "fwrite" returned 0 because it can still be considered a success.

PVince81 commented 8 years ago

Closing as this is old. If scrutinizer is still not happy, let's do a "fix all scrutinizer errors" pass one of these days...

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.