From 4f7f5e4b1fd1077ad134860b32203810ef24c0ce Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Wed, 13 Jan 2021 16:21:03 +0100 Subject: Unified join to always use implode --- it.class | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'it.class') diff --git a/it.class b/it.class index 3351002..84e4fde 100644 --- a/it.class +++ b/it.class @@ -54,7 +54,7 @@ static function createconfig($p = array()) $code[] = "static \$$name = " . var_export($value, true) . ";"; $code[] = "}"; - eval(join("\n", $code)); + eval(implode("\n", $code)); } @@ -174,7 +174,7 @@ static function error($p = array(), $extra = null) if ($_SERVER['REMOTE_ADDR']) $url = "http://" . it::replace([':443$' => ""], $_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI']; # we ignore https for easier debugging else - $url = $_SERVER['SCRIPT_NAME'] . " " . join(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")"; + $url = $_SERVER['SCRIPT_NAME'] . " " . implode(" ", array_slice($GLOBALS['argv'], 1)) . " (pwd " . $_SERVER['PWD'] . ")"; $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); # NOPHPLINT if (!$p['to']) @@ -709,7 +709,7 @@ static function shell_command(/* $cmd, $values1 = array(), ... */) $parts[] = it::_exec_quotevalue($value, "cmd=$cmd key=$key val=$value"); } - $replacements[$tag] = join(" ", $parts); + $replacements[$tag] = implode(" ", $parts); } $cmd = strtr($cmd, (array)$replacements); # Use strtr behaviour of going through source string once @@ -1136,9 +1136,9 @@ static function file_put($filename, $data, $p = array()) $filename = it::safe_filename($filename); if ($p['keyval']) - $data = join("", it::map('"$k\t$v\n"', $data)); + $data = implode("", it::map('"$k\t$v\n"', $data)); else if ($p['lines']) - $data = count((array)$data) ? join("\n", (array)$data) ."\n" : ""; + $data = count((array)$data) ? implode("\n", (array)$data) ."\n" : ""; if ($p['mkdir'] && $filename != "-") @mkdir(dirname($filename)); -- cgit v1.2.3