Skip to content

Fix PHP Warning: Trying to access array offset on null#78

Merged
restena-sw merged 1 commit intosimplesamlphp:masterfrom
happydude:master
May 5, 2025
Merged

Fix PHP Warning: Trying to access array offset on null#78
restena-sw merged 1 commit intosimplesamlphp:masterfrom
happydude:master

Conversation

@happydude
Copy link
Contributor

I'm assuming the array key doesn't exist when not using a resident key

@codecov
Copy link

codecov bot commented May 2, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 10.48%. Comparing base (04738b7) to head (9c9c728).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master      #78   +/-   ##
=========================================
  Coverage     10.48%   10.48%           
- Complexity      324      325    +1     
=========================================
  Files            17       17           
  Lines          1259     1259           
=========================================
  Hits            132      132           
  Misses         1127     1127           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@restena-sw
Copy link
Collaborator

Indeed, "rk" is the only credential property extension defined in the webauthn-2 spec: https://www.w3.org/TR/webauthn-2/#sctn-authenticator-credential-properties-extension

It's safe to be more specific in the array check as suggested by the PR.

@restena-sw restena-sw merged commit f0461a8 into simplesamlphp:master May 5, 2025
22 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants