Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ACF’s picture

Status: Active » Needs review
FileSize
1.88 KB

Patch attached.

gdd’s picture

Status: Needs review » Needs work
+++ b/core/modules/xmlrpc/tests/modules/xmlrpc_test/xmlrpc_test.moduleundefined
@@ -68,7 +68,7 @@ function xmlrpc_test_xmlrpc() {
-  if (variable_get('xmlrpc_test_xmlrpc_alter', FALSE)) {
+  if (state()->get('xmlrpc_test.xmlrpc_alter')) {

This needs a default value.

Otherwise looks fine.

gdd’s picture

I'm sorry I'm stupid. The state() system does not use default values like the variable system does. This needs to be converted to something like

$xmlrpc_alter = state()->get('xmlrpc_test.xmlrpc_alter') ?: FALSE;
if ($xmlrpc_alter) {

I'd rather not put the ternary in the if but that's just me.

I also wouldn't mind seeing the name changed to 'xmlrpc_test.alter' because the second xmlrpc seems redundant.

Gaelan’s picture

Fixes concerns in #3.

Gaelan’s picture

Status: Needs work » Needs review

I am forgetful.

Status: Needs review » Needs work

The last submitted patch, 1848066-xmlprc_to_state-drupal8-4.patch, failed testing.

ACF’s picture

Status: Needs work » Needs review
FileSize
18.91 KB

Attached a patch with the changes requested.

I'm not sure why the state()->get needs a default value, as it was in the if statement and it will fail the conditional statement either with false or null?

Status: Needs review » Needs work

The last submitted patch, 1848066-xmlprc_to_state-drupal8-7.patch, failed testing.

ACF’s picture

Status: Needs work » Needs review
FileSize
1.9 KB

Stupid mistake on the last patch.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Ok good to go!

webchick’s picture

Category: feature » task
Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.