@@ -211,7 +211,7 @@ function onSubmit() {
211211 unset($ global_config );
212212 unset($ dbname_prefix );
213213 }
214-
214+
215215 //* ensure that quota value is not 0 when quota is set for client
216216 if ($ client ['limit_database_quota ' ] > 0 && isset ($ _POST ["database_quota " ]) && $ _POST ["database_quota " ] == 0 ) {
217217 $ app ->tform ->errorMessage .= $ app ->tform ->lng ("limit_database_quota_not_0_txt " )."<br> " ;
@@ -364,7 +364,11 @@ function onBeforeUpdate() {
364364 $ server_config = $ app ->getconf ->get_server_config ($ tmp ['server_id ' ], 'server ' );
365365
366366 // Add default remote_ips from Main Configuration.
367- $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
367+ if (empty ($ global_config ['default_remote_dbserver ' ])) {
368+ $ remote_ips = array ();
369+ } else {
370+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
371+ }
368372 if (!in_array ($ server_config ['ip_address ' ], $ default_remote_db )) { $ remote_ips [] = $ server_config ['ip_address ' ]; }
369373
370374 if ($ server_config ['ip_address ' ]!='' ) {
@@ -449,7 +453,12 @@ function onBeforeInsert() {
449453 $ server_config = $ app ->getconf ->get_server_config ($ tmp ['server_id ' ], 'server ' );
450454
451455 // Add default remote_ips from Main Configuration.
452- $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
456+ if (empty ($ global_config ['default_remote_dbserver ' ])) {
457+ $ remote_ips = array ();
458+ } else {
459+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
460+ }
461+
453462 if (!in_array ($ server_config ['ip_address ' ], $ default_remote_db )) { $ remote_ips [] = $ server_config ['ip_address ' ]; }
454463
455464 if ($ server_config ['ip_address ' ]!='' ) {
0 commit comments