mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-20 17:58:24 +03:00
Fix string writting in local config file
This commit is contained in:
parent
f01bd2b296
commit
5ca9c8a44a
|
@ -356,9 +356,9 @@ class Install {
|
|||
* то меняем значение.
|
||||
*/
|
||||
if(substr_count($sConfig, $sName)) {
|
||||
$sConfig=preg_replace("~".preg_quote($sName).".+;~Ui", $sName.' = '.$sVar.';', $sConfig);
|
||||
$sConfig=preg_replace("~".preg_quote($sName).".+;~Ui", $sName.' = '.addslashes($sVar).';', $sConfig);
|
||||
} else {
|
||||
$sConfig=str_replace('return $config;', $sName.' = '.$sVar.';'.PHP_EOL.'return $config;', $sConfig);
|
||||
$sConfig=str_replace('return $config;', $sName.' = '.addslashes($sVar).';'.PHP_EOL.'return $config;', $sConfig);
|
||||
}
|
||||
file_put_contents($sPath,$sConfig);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue