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

php 7.4 - E_NOTICE on membership dashboard #19545

Merged

Conversation

demeritcowboy
Copy link
Contributor

Overview

  1. Visit membership dashboard
  2. E_NOTICE: Trying to access array offset on value of type null

Before

notice

After

no notice

Technical Details

php 7.4 seems a bit stricter about self:: arrays when you access a nonexistent member.

In php 7.3 trying to access self::$foo['bar'] when bar doesn't exist doesn't seem to give a notice.

Comments

@civibot
Copy link

civibot bot commented Feb 5, 2021

(Standard links)

@civibot civibot bot added the master label Feb 5, 2021
@seamuslee001
Copy link
Contributor

@demeritcowboy i'm thinking that there maybe other places that need patching as well see https://github.com/civicrm/civicrm-core/search?q=_links

@demeritcowboy
Copy link
Contributor Author

demeritcowboy commented Feb 5, 2021

Good thought but just browsing those none of them access member elements, just the main var which doesn't give an error. But I'm sure yes there some non-link variables elsewhere that do something like this.

@eileenmcnaughton
Copy link
Contributor

Merging this as above conversation is non-blocking

@eileenmcnaughton eileenmcnaughton merged commit 206d1e7 into civicrm:master Feb 5, 2021
@demeritcowboy demeritcowboy deleted the membership-notice-php74 branch February 5, 2021 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants