
Property changes on: tests/Zend/Config/Writer
___________________________________________________________________
Added: svn:ignore
   + .IniTest.php.swp


Index: tests/Zend/Config/Writer/IniTest.php
===================================================================
--- tests/Zend/Config/Writer/IniTest.php	(revision 19059)
+++ tests/Zend/Config/Writer/IniTest.php	(working copy)
@@ -233,4 +233,17 @@
 ECS;
         $this->assertEquals($expected, $iniString);
     }
+
+    public function testZF6521_NoDoubleQuoutesInValue()
+    {
+        $config = new Zend_Config(array('default' => array('test' => 'fo"o')));
+
+        try {
+            $writer = new Zend_Config_Writer_Ini(array('config' => $config, 'filename' => $this->_tempName));
+            $writer->write();
+            $this->fail('An expected Zend_Config_Exception has not been raised');
+        } catch (Zend_Config_Exception $expected) {
+            $this->assertContains('Value can not contain double quotes "', $expected->getMessage());
+        }
+    }
 }

Property changes on: library/Zend/Config/Writer
___________________________________________________________________
Added: svn:ignore
   + .Ini.php.swp


Index: library/Zend/Config/Writer/Ini.php
===================================================================
--- library/Zend/Config/Writer/Ini.php	(revision 19059)
+++ library/Zend/Config/Writer/Ini.php	(working copy)
@@ -152,8 +152,12 @@
             return $value;
         } elseif (is_bool($value)) {
             return ($value ? 'true' : 'false');
+        } elseif (strpos($value, '"') === false) {
+            return '"' . $value .  '"';
         } else {
-            return '"' . addslashes($value) .  '"';
+            /** @see Zend_Config_Exception */
+            require_once 'Zend/Config/Exception.php';
+            throw new Zend_Config_Exception('Value can not contain double quotes "');
         }
     }
 }

