]> source.dussan.org Git - nextcloud-server.git/commitdiff
check if glob() returns any results, fix for stable45 was already approved by pull...
authorBjörn Schießle <schiessle@owncloud.com>
Fri, 15 Feb 2013 11:27:56 +0000 (12:27 +0100)
committerBjörn Schießle <schiessle@owncloud.com>
Fri, 15 Feb 2013 11:29:52 +0000 (12:29 +0100)
apps/files_versions/lib/versions.php

index b4ef88a6e874a1249f4a09f75234a91ded172813..f23381cb156311af5077e62398dd7dd799c57134 100644 (file)
@@ -190,6 +190,10 @@ class Storage {
                        $versions = array();
                        // fetch for old versions
                        $matches = glob( $versionsName.'.v*' );
+                       
+                       if ( !$matches ) {
+                               return $versions;
+                       }
 
                        sort( $matches );