Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

guard against possible false value from file_get_contents in Host.php #1430

Conversation

jspaetzel
Copy link
Contributor

There's other circumstances besides is_file && is_readable when file_get_contents may return false. This is a defensive change to prevent TypeErrors when calling trim()

@jspaetzel jspaetzel requested a review from a team as a code owner November 7, 2024 21:08
Copy link

welcome bot commented Nov 7, 2024

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

Copy link

linux-foundation-easycla bot commented Nov 7, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@jspaetzel
Copy link
Contributor Author

Will follow-up on CLA asap

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.66%. Comparing base (38633fb) to head (0fb4683).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1430      +/-   ##
============================================
+ Coverage     73.55%   73.66%   +0.10%     
- Complexity     2683     2685       +2     
============================================
  Files           387      387              
  Lines          7975     7977       +2     
============================================
+ Hits           5866     5876      +10     
+ Misses         2109     2101       -8     
Flag Coverage Δ
8.1 73.22% <100.00%> (-0.06%) ⬇️
8.2 73.49% <100.00%> (+<0.01%) ⬆️
8.3 73.59% <100.00%> (+0.13%) ⬆️
8.4 73.47% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/SDK/Resource/Detectors/Host.php 70.45% <100.00%> (+1.40%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38633fb...0fb4683. Read the comment docs.

@brettmc
Copy link
Collaborator

brettmc commented Nov 12, 2024

@jspaetzel can you run php-cs-fixer to resolve its complaint? Otherwise LGTM and just waiting on CLA to be signed :)

@jspaetzel
Copy link
Contributor Author

✔️ Thanks y'all!

@brettmc brettmc merged commit 7b5cbb5 into open-telemetry:main Nov 15, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants