File tree Expand file tree Collapse file tree
lib/private/Metadata/Provider Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,8 +71,9 @@ public function execute(File $file): array {
7171 $ size ->setId ($ file ->getId ());
7272 $ size ->setArrayAsValue ([]);
7373
74- if (!$ data ) {
75- $ sizeResult = getimagesizefromstring ($ file ->getContent ());
74+ $ content = $ file ->getContent ();
75+ if (!$ data && $ content ) {
76+ $ sizeResult = getimagesizefromstring ($ content );
7677 if ($ sizeResult !== false ) {
7778 $ size ->setArrayAsValue ([
7879 'width ' => $ sizeResult [0 ],
@@ -81,7 +82,7 @@ public function execute(File $file): array {
8182
8283 $ exifData ['size ' ] = $ size ;
8384 }
84- } elseif (array_key_exists ('COMPUTED ' , $ data )) {
85+ } elseif ($ data && array_key_exists ('COMPUTED ' , $ data )) {
8586 if (array_key_exists ('Width ' , $ data ['COMPUTED ' ]) && array_key_exists ('Height ' , $ data ['COMPUTED ' ])) {
8687 $ size ->setArrayAsValue ([
8788 'width ' => $ data ['COMPUTED ' ]['Width ' ],
You can’t perform that action at this time.
0 commit comments