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

Soap api v4_1 is not working with php 8 must be a valid callback, non-static method SugarWebServiceImplv4_1::login() #9741

Open
rahulshinde19 opened this issue Aug 25, 2022 · 0 comments · May be fixed by #10289
Labels
Area: API Issues & PRs related to all things regarding the API Area: PHP8 Issues & PRs related to the CRM when using PHP8 Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate Type:Bug Bugs within the core SuiteCRM codebase

Comments

@rahulshinde19
Copy link
Contributor

Soap api v4_1 failing while calling any method
We are using SuiteCRM version 7.12.7 with PHP 8.0.13
while calling Soap api we are getting following error.

<faultstring xsi:type="xsd:string">Unknown error in SOAP call: service died unexpectedly</faultstring>
         <detail xsi:type="xsd:string"><![CDATA[<br />
<b>Fatal error</b>:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method SugarWebServiceImplv4_1::login() cannot be called statically in C:\xampp80\htdocs\SuiteCRM-7.12.7\include\nusoap\nusoap.php:5437
Stack trace:
#0 C:\xampp80\htdocs\SuiteCRM-7.12.7\include\nusoap\nusoap.php(5054): nusoap_server-&gt;invoke_method()
#1 C:\xampp80\htdocs\SuiteCRM-7.12.7\service\core\NusoapSoap.php(93): nusoap_server-&gt;service('&lt;soapenv:Envelo...')
#2 C:\xampp80\htdocs\SuiteCRM-7.12.7\service\core\webservice.php(70): NusoapSoap-&gt;serve()
#3 C:\xampp80\htdocs\SuiteCRM-7.12.7\service\v4_1\soap.php(56): require_once('C:\\xampp80\\htdo...')
#4 {main}
  thrown in <b>C:\xampp80\htdocs\SuiteCRM-7.12.7\include\nusoap\nusoap.php</b> on line <b>5437</b><br />]]></detail>

Expected Behavior

The login soap v4_1 API should return session token and other api should work

Actual Behavior

It is returning error for all APIs
The function call_user_func_array throwing fatal error in PHP 8 if the function is not static. In the code call_user_func_array is calling method statically but all methods are not declared as non-static

Possible Fix

In include/nusoap/nusoap.php line number 5428 the control should not go into elseif ($delim == '..') this condition. it should go to else instead.

Steps to Reproduce

Call soap api service/v4_1/soap.php with parameters

Your Environment

  • SuiteCRM Version used: 7.12.7
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
  • Environment name and version (e.g. MySQL, PHP 8.0.13):
  • Operating System and version (e.g RedHat 8.6):
@johnM2401 johnM2401 added Type:Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Needs Assessed Needs the core team to assess Area: API Issues & PRs related to all things regarding the API Area: PHP8 Issues & PRs related to the CRM when using PHP8 labels Aug 29, 2022
@gemartin21 gemartin21 added Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate and removed Status:Needs Assessed Needs the core team to assess labels Mar 10, 2023
@gemartin21 gemartin21 added the Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: API Issues & PRs related to all things regarding the API Area: PHP8 Issues & PRs related to the CRM when using PHP8 Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Status:Fix Proposed A issue that has a PR related to it that provides a possible resolution Status: Team Investigating Labels for issues in which the Core Team are investigating / Intend to Investigate Type:Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants