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

[REF][php8-compat] Fix more instances of where there is a required pa… #20497

Merged

Conversation

seamuslee001
Copy link
Contributor

…rameter for a function after an optional one and fix an issue where by a NULL function property is treated as not exisiting in php8

Overview

Title says it all

Before

PHP8 Errors generated in unit tests

After

Less PHP8 Errors generated

ping @eileenmcnaughton @totten @demeritcowboy

@civibot
Copy link

civibot bot commented Jun 4, 2021

(Standard links)

@civibot civibot bot added the master label Jun 4, 2021
…rameter for a function after an optional one and fix an issue where by a NULL function property is treated as not exisiting in php8
@seamuslee001 seamuslee001 force-pushed the more_required_after_optional branch from 58e9bd4 to 47eea6b Compare June 4, 2021 00:45
// return the stubbed permission (defaulting to true if the array is missing)
return is_array($this->permissions) ? in_array($str, $this->permissions) : TRUE;
return isset($this->permissions) && is_array($this->permissions) ? in_array($str, $this->permissions) : TRUE;
Copy link
Contributor

Choose a reason for hiding this comment

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

My personal pref is to clarify the groupings with brackets and it's not unheard of for php to change the order between versions (in fact in looks like there's a minor change for . in 8 - not relevant here), but ok this looks right.

@eileenmcnaughton eileenmcnaughton merged commit 3aeb90b into civicrm:master Jun 4, 2021
@eileenmcnaughton eileenmcnaughton deleted the more_required_after_optional branch June 4, 2021 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants