Skip to content

[stable13] Fix local users check in contacts menu - #9732

Merged
MorrisJobke merged 2 commits into
stable13from
stable13-fix-contacts-menu-local-null-check
Jun 4, 2018
Merged

[stable13] Fix local users check in contacts menu#9732
MorrisJobke merged 2 commits into
stable13from
stable13-fix-contacts-menu-local-null-check

Conversation

@ChristophWurst

Copy link
Copy Markdown
Member

Backport of #9725

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurstChristophWurst added the 3. to review Waiting for reviews label Jun 4, 2018
@ChristophWurstChristophWurst added this to the Nextcloud 13.0.3 milestone Jun 4, 2018
@ChristophWurstChristophWurst self-assigned this Jun 4, 2018
}
if ($shareType === 0 || $shareType === 6) {
if ($contact['UID'] === $shareWith && $contact['isLocalSystemBook'] === true) {
$isLocal = $contact['isLocalSystemBook'] ?? false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP 7.0+ only operator 😉 Use this instead:

$isLocal = isset($contact['isLocalSystemBook']) ? $contact['isLocalSystemBook'] : false;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And CI would have catched this 🚀 🙌 https://drone.nextcloud.com/nextcloud/server/7709/90

MorrisJobke
MorrisJobke previously requested changes Jun 4, 2018

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@codecov

codecovBot commented Jun 4, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9732 into stable13 will increase coverage by <.01%.
The diff coverage is 100%.

@@ Coverage Diff @@## stable13 #9732 +/- ##
==============================================
+ Coverage 51.44% 51.44% +<.01% - Complexity 25130 25131 +1 
==============================================
Files 1613 1613 Lines 95617 95618 +1 Branches 1376 1376 ==============================================
+ Hits 49188 49190 +2 + Misses 46429 46428 -1
Impacted FilesCoverage ΔComplexity Δ
...ib/private/Contacts/ContactsMenu/ContactsStore.php86.13% <100%> (+0.13%)42 <0> (+1)⬆️
apps/files_trashbin/lib/Trashbin.php72.53% <0%> (+0.24%)136% <0%> (ø)⬇️

@MorrisJobke
MorrisJobke merged commit e656c8e into stable13Jun 4, 2018
@rullzer
rullzer deleted the stable13-fix-contacts-menu-local-null-check branch June 4, 2018 14:41
@MorrisJobkeMorrisJobke mentioned this pull request Jun 4, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@ChristophWurst@rullzer@MorrisJobke