if ($hostVal == '') {
continue;
}
- $str .= $hostProp . '=' . $hostVal . "\n";
+ $str .= $hostProp
+ . '=' . static::quoteIniValue($hostVal) . "\n";
}
}
$cfgFilePath = $this->getConfigFilePath();
}
return null;
}
+
+ public static function quoteIniValue($val)
+ {
+ if (strpos($val, '=') === false) {
+ return $val;
+ }
+ return '"' . $val . '"';
+ }
}
?>