From: Aaron Schulz Date: Tue, 24 Jun 2014 18:17:48 +0000 (-0700) Subject: Avoid warnings for empty file sha1 keys X-Git-Tag: 1.31.0-rc.0~15213^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=113742fe9904dbb1aeaa9364cf34c8f04fce82b8;p=lhc%2Fweb%2Fwiklou.git Avoid warnings for empty file sha1 keys bug: 40362 Change-Id: I19d3b38a121171153875cde8bef4ca34b3e49d67 --- diff --git a/maintenance/deleteArchivedFiles.inc b/maintenance/deleteArchivedFiles.inc index 33da666724..0c0b34a333 100644 --- a/maintenance/deleteArchivedFiles.inc +++ b/maintenance/deleteArchivedFiles.inc @@ -39,6 +39,10 @@ class DeleteArchivedFilesImplementation { $count = 0; foreach ( $res as $row ) { $key = $row->fa_storage_key; + if ( !strlen( $key ) ) { + $output->handleOutput( "Entry with ID {$row->fa_id} has empty key, skipping\n" ); + continue; + } $group = $row->fa_storage_group; $id = $row->fa_id; $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key;