Fix implode() wrong parameter order (#6866)

It has been deprecated in PHP 7.4.

Such as PHP deprecated:  implode(): Passing glue string after array is deprecated. Swap the parameters in /var/www/roundcubemail/program/lib/Roundcube/rcube_db.php on line 917

Signed-off-by: Jack Cherng <jfcherng@gmail.com>
pull/6894/head
Jack Cherng 5 years ago committed by Aleksander Machniak
parent adcfa53532
commit 198585d8a0

@ -130,7 +130,7 @@ if (strtolower($input) == 'y') {
} }
if (!empty($adds)) { if (!empty($adds)) {
echo implode($adds, "\n") . "\n\n"; echo implode("\n", $adds) . "\n\n";
} }
echo "Running update script at target...\n"; echo "Running update script at target...\n";

@ -752,7 +752,7 @@ class enigma_ui
} }
$table->add('title', html::label('key-name', rcube::Q($this->enigma->gettext('newkeyident')))); $table->add('title', html::label('key-name', rcube::Q($this->enigma->gettext('newkeyident'))));
$table->add(null, html::tag('ul', 'proplist', implode($identities, "\n"))); $table->add(null, html::tag('ul', 'proplist', implode("\n", $identities)));
// Key size // Key size
$select = new html_select(array('name' => 'size', 'id' => 'key-size')); $select = new html_select(array('name' => 'size', 'id' => 'key-size'));

@ -357,7 +357,7 @@ class rcube_contacts extends rcube_addressbook
if (!empty($post_search) || !empty($required)) { if (!empty($post_search) || !empty($required)) {
$ids = array(0); $ids = array(0);
// build key name regexp // build key name regexp
$regexp = '/^(' . implode(array_keys($post_search), '|') . ')(?:.*)$/'; $regexp = '/^(' . implode('|', array_keys($post_search)) . ')(?:.*)$/';
// use initial WHERE clause, to limit records number if possible // use initial WHERE clause, to limit records number if possible
if (!empty($where)) if (!empty($where))
$this->set_search_set($where); $this->set_search_set($where);

@ -914,7 +914,7 @@ class rcube_db
$name[] = $start . $elem . $end; $name[] = $start . $elem . $end;
} }
return implode($name, '.'); return implode('.', $name);
} }
/** /**

@ -207,8 +207,8 @@ function rcmail_contact_search()
// search request ID // search request ID
$search_request = md5('addr' $search_request = md5('addr'
.(is_array($fields) ? implode($fields, ',') : $fields) .(is_array($fields) ? implode(',', $fields) : $fields)
.(is_array($search) ? implode($search, ',') : $search)); .(is_array($search) ? implode(',', $search) : $search));
// save search settings in session // save search settings in session
$_SESSION['search'][$search_request] = $search_set; $_SESSION['search'][$search_request] = $search_set;

@ -82,7 +82,7 @@ if ($isHtml) {
} }
// append doctype and html/body wrappers // append doctype and html/body wrappers
$bstyle = !empty($bstyle) ? (" style='" . implode($bstyle, '; ') . "'") : ''; $bstyle = !empty($bstyle) ? (" style='" . implode('; ', $bstyle) . "'") : '';
$message_body = '<html><head>' $message_body = '<html><head>'
. '<meta http-equiv="Content-Type" content="text/html; charset=' . '<meta http-equiv="Content-Type" content="text/html; charset='
. ($message_charset ?: RCUBE_CHARSET) . '" /></head>' . ($message_charset ?: RCUBE_CHARSET) . '" /></head>'

Loading…
Cancel
Save