File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 9
9
namespace OC \Repair ;
10
10
11
11
use OCA \Theming \ImageManager ;
12
+ use OCP \Files \NotFoundException ;
13
+ use OCP \Files \NotPermittedException ;
12
14
use OCP \IConfig ;
13
15
use OCP \Migration \IOutput ;
14
16
use OCP \Migration \IRepairStep ;
@@ -44,9 +46,18 @@ public function run(IOutput $output): void {
44
46
return ;
45
47
}
46
48
47
- $ simpleFile = $ imageManager ->getImage ('logo ' , false );
48
-
49
- $ image = @imagecreatefromstring ($ simpleFile ->getContent ());
49
+ try {
50
+ try {
51
+ $ simpleFile = $ imageManager ->getImage ('logo ' , false );
52
+ $ image = @imagecreatefromstring ($ simpleFile ->getContent ());
53
+ } catch (NotFoundException |NotPermittedException ) {
54
+ $ simpleFile = $ imageManager ->getImage ('logo ' );
55
+ $ image = false ;
56
+ }
57
+ } catch (NotFoundException |NotPermittedException ) {
58
+ $ output ->info ('Theming is not used to provide a logo ' );
59
+ return ;
60
+ }
50
61
51
62
$ dimensions = '' ;
52
63
if ($ image !== false ) {
You can’t perform that action at this time.
0 commit comments