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

Fix "Undefined variable $c" in Zend_XmlRpc_Server::setResponseClass() #451

Merged

Conversation

lapiudevgit
Copy link

The setResponseClass() method of Zend_XmlRpc_Server cannot be used because it throws an error: "Undefined variable $c".

This can be tested by running the corresponding unit test:

$ ./bin/phpunit --stderr -d memory_limit=-1  tests/Zend/XmlRpc/ServerTest.php
PHPUnit 9.6.21 by Sebastian Bergmann and contributors.
..........E........................E.                             37 / 37 (100%)
Time: 00:00.052, Memory: 8.00 MB
There were 2 errors:
1) Zend_XmlRpc_ServerTest::testSetResponseClass
Undefined variable $c
/var/www/html/limesurvey/upload/zf1-future/library/Zend/XmlRpc/Server.php:468
/var/www/html/limesurvey/upload/zf1-future/tests/Zend/XmlRpc/ServerTest.php:272
2) Zend_XmlRpc_ServerTest::testPassingInvalidResponseClassThrowsException
Undefined variable $c
/var/www/html/limesurvey/upload/zf1-future/library/Zend/XmlRpc/Server.php:468
/var/www/html/limesurvey/upload/zf1-future/tests/Zend/XmlRpc/ServerTest.php:667
ERRORS!
Tests: 37, Assertions: 98, Errors: 2.

Commit 273916d broke this by replacing the and operator by &&, because && has precedence over the assignment, while and doesn't. Adding the parenthesis solves the issue.

@develart-projects develart-projects added the bug Something isn't working label Oct 10, 2024
@develart-projects develart-projects merged commit 98b1405 into Shardj:master Oct 10, 2024
11 checks passed
@develart-projects develart-projects added the to be released PR exists or in master, but not released yet label Oct 10, 2024
@develart-projects develart-projects added this to the 1.24.1 milestone Oct 10, 2024
@gabrieljenik
Copy link

Thanks for merging. Do you expect this merge to be included in a release soon? I mention that as we need that in order to consume the repo through composer.

@develart-projects
Copy link
Collaborator

@gabrieljenik in coming days, hopefully. Now I'm trying to understand one last PR, before merge. Once that's done, we are free to go forward.

@gabrieljenik
Copy link

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to be released PR exists or in master, but not released yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants