Fix #9741 SOAP API problems after upgrading PHP. Suite 7.14 on PHP 8.2. #10289
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #9741
Issue report on forum:
https://community.suitecrm.com/t/soap-api-problems-after-upgrading-7-14-php-8-2/90179
Forum user pepeflores says:
"I’m using implicit frontend to sync outlook and suitecrm.
After upgrading to suitecrm 7.14 and php 8.2 and facing that no access to suitecrm is possible, even validate user/password.
the logs that the server is generating are
Description
Relevant error log text:
Forum user abuzarfaris proposes changing code for "calling class method" (static class call) to same code as found in the immediately following code block for "calling instance method" (non-static i.e. instance method call) so that the Fatal crash would not occur when running Suite 7.14 on the required PHP 8.x. Until now, PHP 7.x did not consider these
Uncaught TypeError
s to be Fatal and cause a crash of this API login code. Now in PHP this does cause a Fatal and a crash and block API login.A better fix may be to make static class calls work properly, without running them as instance method calls.
This fixes several bug reports for failed SOAP API login on PHP 8.x !
Motivation and Context
Allow API login on PHP 8.x to work without crashing with a Fatal uncaught
TypeError
exception.How To Test This
Try to login thru the SOAP API before (fail to login) and after this change (login works and thus API works).
Types of changes
Final checklist