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

Change to Boolean logic #999

Merged
merged 3 commits into from
Dec 4, 2023
Merged

Change to Boolean logic #999

merged 3 commits into from
Dec 4, 2023

Conversation

ajstanley
Copy link

GitHub Issue: (Issue 998)

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

There's a small error in operator precedence allowing us to get to a place in the code where we shouldn't be

What's new?

A minor change in logic

How should this be tested?

You can test this with a non-tiff image missing dimensional data, but it's unlikely you'd have one on hand.
This should illustrate the change.

 <?PHP
# Before the change
$mime = 'image/jp2';
$height = NULL;
$width = NULL;
if ($mime === 'image/tif' && !$height || !$width){
	print "This line should not be visible";
}
 <?PHP
# After the change
$mime = 'image/jp2';
$height = NULL;
$width = NULL;
if ($mime === 'image/tif' && (!$height || !$width)){
	print "This line should not be visible";
}
 

Documentation Status

  • Does this change existing behaviour that's currently documented?
  • Does this change require new pages or sections of documentation?
  • Who does this need to be documented for?
  • Associated documentation pull request(s): ___ or documentation issue ___

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

@rosiel rosiel merged commit 28174c3 into Islandora:2.x Dec 4, 2023
18 checks passed
rosiel pushed a commit that referenced this pull request Apr 2, 2024
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.

2 participants