We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L44
I know this is a PHP bug, but it can be avoided. This might be related to https://bugs.php.net/bug.php?id=54256
Please use
<?php $it->rewind(); while ($it->valid()) { echo $it->current()->getBasename().PHP_EOL; $it->next(); } ?>
In favor of
<?php foreach ($it as $file) { echo $file->getBasename().PHP_EOL; } ?>
<?php $path = getcwd().'/test'; $it = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::CHILD_FIRST ); echo 'Test with foreach: '.PHP_EOL; foreach ($it as $file) { echo $file->getBasename().PHP_EOL; } ?>
<?php $path = getcwd().'/test'; $it = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::CHILD_FIRST ); echo 'Test with while: '.PHP_EOL; $it->rewind(); while ($it->valid()) { echo $it->current()->getBasename().PHP_EOL; $it->next(); } ?>
Test with foreach: foo.bar .. Test with while: . foo.bar ..
Test with foreach: Test with while: . foo.bar ..
The foreach fails.
Operating system: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise
Web server: Server version: Apache/2.2.22 (Ubuntu) Server built: Mar 19 2014 21:11:10
Database: psql (PostgreSQL) 9.1.9
PHP version: PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr 4 2014 01:30:04)
ownCloud version: (see ownCloud admin page) ownCloud 6.0.2 (git)
Updated from an older ownCloud or fresh install: fresh install
List of activated apps: none
The content of config/config.php: Upon request
Are you using external storage, if yes which one: local/smb/sftp/... NFS3 on a local mount
Are you using encryption: yes/no encripted partition
Browser: N/A
Operating system: N/A
N/A
The text was updated successfully, but these errors were encountered:
Additional information: I've tested this with PHP5.5.9 on a NFS4 mount without any problems
Sorry, something went wrong.
@icewind1991 @bantu @karlitschek Can you please have a look?
@pluijm Thanks a lot for digging into this! Can I ask you to open a pull request and contribute your fix? THX
d8be9d9
No branches or pull requests
See https://github.com/owncloud/core/blob/master/lib/private/files/storage/local.php#L44
I know this is a PHP bug, but it can be avoided. This might be related to https://bugs.php.net/bug.php?id=54256
Please use
In favor of
Steps to reproduce
Expected behaviour
Actual behaviour
The foreach fails.
Server configuration
Operating system:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise
Web server:
Server version: Apache/2.2.22 (Ubuntu)
Server built: Mar 19 2014 21:11:10
Database:
psql (PostgreSQL) 9.1.9
PHP version:
PHP 5.3.10-1ubuntu3.11 with Suhosin-Patch (cli) (built: Apr 4 2014 01:30:04)
ownCloud version: (see ownCloud admin page)
ownCloud 6.0.2 (git)
Updated from an older ownCloud or fresh install:
fresh install
List of activated apps:
none
The content of config/config.php:
Upon request
Are you using external storage, if yes which one: local/smb/sftp/...
NFS3 on a local mount
Are you using encryption: yes/no
encripted partition
Client configuration
Browser:
N/A
Operating system:
N/A
Logs
Web server error log
N/A
ownCloud log (data/owncloud.log)
N/A
Browser log
N/A
The text was updated successfully, but these errors were encountered: