Skip to content
Snippets Groups Projects
Commit 4cc356db authored by fantu's avatar fantu
Browse files

Replace split (deprecated in php 5.3 and removed in php 6) with preg_split

parent 87a11b4e
No related branches found
No related tags found
No related merge requests found
...@@ -92,7 +92,7 @@ function setConfigVar( $filename, $varName, $varValue ) { ...@@ -92,7 +92,7 @@ function setConfigVar( $filename, $varName, $varValue ) {
$out = ''; $out = '';
$found = 0; $found = 0;
foreach($lines as $line) { foreach($lines as $line) {
list($key, $value) = split("[\t= ]+", $line, 2); list($key, $value) = preg_split("/[\t= ]+/", $line, 2);
if($key == $varName) { if($key == $varName) {
$out .= $varName." ".$varValue."\n"; $out .= $varName." ".$varValue."\n";
$found = 1; $found = 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment