Skip to content

Commit

Permalink
fixup! performance optimisation for carddav backend blob data read
Browse files Browse the repository at this point in the history
  • Loading branch information
miaulalala committed Aug 15, 2022
1 parent d380606 commit e76c20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dav/lib/CardDAV/CardDavBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,11 @@ private function readBlob($cardData, &$modified = false) {
return $cardData;
}

$cardData = explode("\r\n", $cardData);
$cardDataArray = explode("\r\n", $cardData);

$cardDataFiltered = [];
$removingPhoto = false;
foreach ($cardData as $line) {
foreach ($cardDataArray as $line) {
if (strpos($line, 'PHOTO:data:') === 0
&& strpos($line, 'PHOTO:data:image/') !== 0) {
// Filter out PHOTO data of non-images
Expand Down

0 comments on commit e76c20b

Please sign in to comment.