Sfoglia il codice sorgente

#928 Setup crashing if async_retries is configured

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@3174 a333f486-631f-4898-b8df-5754b55c2be0
romainq 11 anni fa
parent
commit
2fb450f1be
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      core/config.class.inc.php

+ 3 - 3
core/config.class.inc.php

@@ -1754,14 +1754,14 @@ class Config
 	/**
 	 * Pretty format a var_export'ed value so that (if possible) the identation is preserved on every line
 	 * @param mixed $value The value to export
-	 * @param string $sIdentation The string to use to indent the text
+	 * @param string $sIndentation The string to use to indent the text
 	 * @param bool $bForceIndentation Forces the identation (enven if it breaks/changes an eval, for example to ouput a value inside a comment)
 	 * @return string The indented export string
 	 */
-	protected static function PrettyVarExport($value, $sIdentation, $bForceIndentation = false)
+	protected static function PrettyVarExport($value, $sIndentation, $bForceIndentation = false)
 	{
 		$sExport = var_export($value, true);
-		$sNiceExport = trim(preg_replace("/^/m", "\t\t\t", $sExport));
+		$sNiceExport = str_replace(array("\r\n", "\n", "\r"), "\n".$sIndentation, trim($sExport));
 		if (!$bForceIndentation)
 		{
 			eval('$aImported='.$sNiceExport.';');