Here's an example minimal pattern

All I want is

   variable_set("site_map_show_rss_links", FALSE);
<?xml version="1.0" encoding="ISO-8859-1"?>
<pattern>
  <info><!-- blah blah --></info>
  <actions>
    <variable name="site_map_show_rss_links">0</variable>
  </actions>
</pattern>

... does not work due to a line in the middle of system.inc
A common oversight - needed isset().

-            if (!$item['value'] && !$item['delete']) {
+            if (! isset($item['value']) && !$item['delete']) {
             	$value = $item;

It actually ends up putting a malformed array into the variable ... which registers as TRUE , so we can never turn things off.

Patch attached.

Comments

sarvab’s picture

Status: Needs review » Closed (fixed)

Nice catch. Fix committed and should be no reason for review here so closing.