testlink-java-api icon indicating copy to clipboard operation
testlink-java-api copied to clipboard

PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array,

Open zzjss12 opened this issue 1 year ago • 1 comments

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 avatar Dec 15 '23 02:12 zzjss12

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

kinow avatar Dec 15 '23 09:12 kinow