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 Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, #150

Open
zzjss12 opened this issue Dec 15, 2023 · 1 comment
Labels

Comments

@zzjss12
Copy link

zzjss12 commented Dec 15, 2023

Describe the bug
I can obtain the TestLink API through Url and devKey, but when I call System. out. println (api. sayHello()); Or System. out. println (api. ping());
The following error will be reported:
0}`R{GT%KF5Describe the bug I can obtain the TestLink API through Url and devKey, but when I call System. out. println (api. sayHello()); Or System. out. println (API. ping()); The following error will be reported: $C1IUGFQWM

I have also reviewed similar issues that involve unexplainable responses before, and it seems that they cannot solve my problem.
Later, when I checked the log, the misalignment displayed in the log was as follows:

[php:error] [pid 20116:tid 1876] [client 127.0.0.1:53654] PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in D:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php:360\nStack trace:\n#0 D:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php(324): IXR_Server->call('tl.sayHello', NULL)\n#1 D:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php(285): IXR_Server->serve('<?xml version="...')\n#2 D:\xampp\htdocs\testlink\lib\api\xmlrpc\v1\xmlrpc.class.php(285): IXR_Server->__construct(Array)\n#3 D:\xampp\htdocs\testlink\lib\api\xmlrpc\v1\xmlrpc.php(20): TestlinkXMLRPCServer->__construct()\n#4 {main}\n thrown in D:\xampp\htdocs\testlink\third_party\xml-rpc\class-IXR.php on line 360

I can locate the 360 line of class IXR. php through the error prompt above, but I cannot understand why this situation occurs

Versions:

  • TestLink: [1.9.20_fixed]
  • testlink-java-api: [1.9.20-0]
  • JVM [1.8]
@zzjss12 zzjss12 added the bug label Dec 15, 2023
@kinow
Copy link
Owner

kinow commented Dec 15, 2023

That "got br" is strange. Not sure if that's an HTML br or if my GitHub UI is not showing everything. The rqsiest way for you to confirm what's happenijg is either debug on the Java side, or inspect logs and php code on the server side.

I am busy at $work with little time to volunteer to Open Source (not using this in my current job). I can review, merge, release pull requests if someone prepares one and tests it.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants