Skip to content

Commit e3f14f7

Browse files
author
Till Brehm
committed
Fixed Uncaught TypeError: array_merge(): Argument #1 must be of type array, bool given in /usr/local/ispconfig/server/plugins-available/shelluser_jailkit_plugin.inc.php:530
1 parent 7963783 commit e3f14f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/plugins-available/shelluser_jailkit_plugin.inc.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,8 @@ function _setup_jailkit_chroot()
318318
$options = array('hardlink');
319319
} elseif ($this->jailkit_config['jailkit_hardlinks'] == 'no') {
320320
$options = array();
321+
} else {
322+
$options = array();
321323
}
322324
} else {
323325
$options = array('allow_hardlink');
@@ -527,7 +529,11 @@ private function _setup_ssh_rsa() {
527529
// Remove duplicate keys
528530
$existing_keys = @file($sshkeys, FILE_IGNORE_NEW_LINES);
529531
$new_keys = explode("\n", $userkey);
530-
$final_keys_arr = @array_merge($existing_keys, $new_keys);
532+
if(is_array($existing_keys)) {
533+
$final_keys_arr = @array_merge($existing_keys, $new_keys);
534+
} else {
535+
$final_keys_arr = $new_keys;
536+
}
531537
$new_final_keys_arr = array();
532538
if(is_array($final_keys_arr) && !empty($final_keys_arr)){
533539
foreach($final_keys_arr as $key => $val){

0 commit comments

Comments
 (0)