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

[php8-compat][REF] Fix php8 error on undefined constant CIVICRM_DISAB… #20485

Conversation

seamuslee001
Copy link
Contributor

…LE_DEFAULT_MENU

Overview

This fixes the following php8 error

skip to main content \n\n BUILD-1 [1] \n\nERROR\n\n The website encountered an unexpected error. Please try again later. \n\nERROR MESSAGE\n\n _Error_: Undefined constant \"CIVICRM_DISABLE_DEFAULT_MENU\" in _constant()_\n(line _244_ of\n_/home/jenkins/bknix-edge/build/build-1/web/sites/all/modules/civicrm/CRM/Core/Resources/Common.php_).\n\n\nLinks:\n------\n[1]

Before

Error on undefined constant

After

No error about undefined constant

Technical Details

CRM_Utils_Constant::value does a if defined check before trying to access the value of the constant

ping @eileenmcnaughton @totten @colemanw

@civibot
Copy link

civibot bot commented Jun 2, 2021

(Standard links)

@civibot civibot bot added the master label Jun 2, 2021
@seamuslee001 seamuslee001 force-pushed the fix_not_always_defined_constant branch from 807baa6 to 704cb10 Compare June 2, 2021 23:39
@eileenmcnaughton
Copy link
Contributor

Would it be too cynical to guess this is an undocumented (perhaps long forgotten) magic param?

@eileenmcnaughton eileenmcnaughton merged commit 446044f into civicrm:master Jun 3, 2021
@eileenmcnaughton eileenmcnaughton deleted the fix_not_always_defined_constant branch June 3, 2021 01:43
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.

2 participants