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

Fix Varien_Io_File ignored errors with error control operator #1269

Merged
merged 4 commits into from
Jul 5, 2022
Merged

Fix Varien_Io_File ignored errors with error control operator #1269

merged 4 commits into from
Jul 5, 2022

Conversation

luigifab
Copy link
Contributor

@luigifab luigifab commented Oct 19, 2020

Description

This fix some (perhaps not all) Varien_Io_File ignored errors with error control operator.

  • fclose supplied resource is not a valid stream resource
  • chdir: No such file or directory (errno 2)
  • chmod: No such file or directory

I hope it's good.
OpenMage 20.0.10 - 20.0.13 / PHP 7.4.6 and 8.0.5 - 8.0.14

Manual testing scenarios

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* labels Oct 19, 2020
lib/Varien/Io/File.php Outdated Show resolved Hide resolved
@kkrieger85 kkrieger85 added the hacktoberfest easy to solve issues for https://hacktoberfest.digitalocean.com/ participant (and everyone else) label Oct 22, 2020
@luigifab luigifab requested a review from sreichel January 7, 2021 18:06
- fclose supplied resource is not a valid stream resource
- chdir  No such file or directory (errno 2)
- chmod no such file or directory
- imagedestroy supplied resource is not a valid Image resource
- fclose supplied resource is not a valid stream resource
@woutersamaey
Copy link
Contributor

Can we get this merged pls?

addison74
addison74 previously approved these changes Jan 12, 2022
woutersamaey
woutersamaey previously approved these changes Jan 12, 2022
@luigifab
Copy link
Contributor Author

I can't "Approve me". That's scandalous!
cap

lib/Varien/Image/Adapter/Gd2.php Outdated Show resolved Hide resolved
Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
@luigifab luigifab dismissed stale reviews from woutersamaey and addison74 via 4664196 May 2, 2022 07:24
fballiano
fballiano previously approved these changes May 2, 2022
kiatng
kiatng previously approved these changes May 3, 2022
if ($this->_streamLocked) {
$this->streamUnlock();
}
@fclose($this->_streamHandler);
if (is_resource($this->_streamHandler)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

From #2040, this is not good, there is a better way with $this->_IsValidSource().

@luigifab luigifab changed the title Fix Varien/Io/File.php ignored errors with error control operator Fix Varien_Io_File ignored errors with error control operator May 14, 2022
@luigifab luigifab dismissed stale reviews from kiatng and fballiano via 0ed3334 May 18, 2022 06:46
@fballiano
Copy link
Contributor

@luigifab
Schermata 2022-07-05 alle 10 36 13

@luigifab
Copy link
Contributor Author

luigifab commented Jul 5, 2022

Strange, it doesn't appear for me... Yes it is still present for permission denied.

@fballiano
Copy link
Contributor

weird, you're not the only one who doesn't see those...

lib/Varien/Io/File.php Show resolved Hide resolved
@fballiano fballiano merged commit add1065 into OpenMage:1.9.4.x Jul 5, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  +1  5 ✔️ +1  2 💤 ±0  0 ❌ ±0 

Results for commit add1065. ± Comparison against base commit 94563c7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* hacktoberfest easy to solve issues for https://hacktoberfest.digitalocean.com/ participant (and everyone else)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants