diff --git a/classes/PostFixtures.inc b/classes/PostFixtures.inc index 095f42a..022b1c5 100644 --- a/classes/PostFixtures.inc +++ b/classes/PostFixtures.inc @@ -229,8 +229,12 @@ class PostFixtures { function process_blog_options($options, $categories) { $this->_category = $categories; foreach ($options as $option => $value) { - $value = preg_replace_callback('#\$\{([^\}]+)\}#', array(&$this, '_process_blog_options_callback'), $value); - update_option($option, $value); + if ($value === false) { + delete_option($option); + } else { + $value = preg_replace_callback('#\$\{([^\}]+)\}#', array(&$this, '_process_blog_options_callback'), $value); + update_option($option, $value); + } } unset($this->_category); } diff --git a/test/PostFixturesTest.php b/test/PostFixturesTest.php index 93275a2..6d0089b 100644 --- a/test/PostFixturesTest.php +++ b/test/PostFixturesTest.php @@ -272,6 +272,10 @@ class PostFixturesTest extends PHPUnit_Framework_TestCase { foreach ($expected_fields as $name => $value) { $this->assertEquals($value, get_option($name)); + if ($value === false) { + $all_options = get_alloptions(); + $this->assertTrue(!isset($all_options[$name])); + } } } }