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.1 Fixes passing null to trim() - for non-existing payment methods #2939

Merged
merged 2 commits into from
Jan 15, 2023
Merged

PHP8.1 Fixes passing null to trim() - for non-existing payment methods #2939

merged 2 commits into from
Jan 15, 2023

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jan 14, 2023

Fixed Issues (if relevant)

Deprecated functionality: trim(): Passing null to parameter #1 ($string) of type string is deprecated  in /var/www/html/app/code/core/Mage/Core/Model/Config.php on line 1422

#0 [internal function]: mageCoreErrorHandler(8192, 'trim(): Passing...', '/var/www/html/a...', 1422)
#1 /var/www/html/app/code/core/Mage/Core/Model/Config.php(1422): trim(NULL)
#2 /var/www/html/app/code/core/Mage/Core/Model/Config.php(1444): Mage_Core_Model_Config->getModelClassName(NULL)
#3 /var/www/html/app/Mage.php(532): Mage_Core_Model_Config->getModelInstance(NULL, Array)
#4 /var/www/html/app/code/core/Mage/Payment/Helper/Data.php(46): Mage::getModel(NULL)
#5 /var/www/html/app/code/core/Mage/Payment/Helper/Data.php(162): Mage_Payment_Helper_Data->getMethodInstance('pbridge')

Manual testing scenarios (*)

  1. use sample data
  2. go to admin -> sales -> Recurring Profiles
  3. ...

Questions or comments

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)
  • Add yourself to contributors list

@sreichel sreichel added the PHP 8.1 Related to PHP 8.1 label Jan 14, 2023
@github-actions github-actions bot added the Component: Payment Relates to Mage_Payment label Jan 14, 2023
@sreichel sreichel changed the title PHP8.1 Fixes passing null as to trim() - for non-existing payment methods PHP8.1 Fixes passing null to trim() - for non-existing payment methods Jan 15, 2023
Copy link
Contributor

@fballiano fballiano left a comment

Choose a reason for hiding this comment

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

translation not needed, LGTM

@fballiano fballiano merged commit 0136fa5 into OpenMage:1.9.4.x Jan 15, 2023
@fballiano
Copy link
Contributor

merged and cherrypicked to v20 with no conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Payment Relates to Mage_Payment PHP 8.1 Related to PHP 8.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants