File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 99namespace OC \Repair ;
1010
1111use OCA \Theming \ImageManager ;
12+ use OCP \Files \NotFoundException ;
13+ use OCP \Files \NotPermittedException ;
1214use OCP \IConfig ;
1315use OCP \Migration \IOutput ;
1416use OCP \Migration \IRepairStep ;
@@ -44,9 +46,18 @@ public function run(IOutput $output): void {
4446 return ;
4547 }
4648
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+ }
5061
5162 $ dimensions = '' ;
5263 if ($ image !== false ) {
You can’t perform that action at this time.
0 commit comments