@@ -389,12 +389,14 @@ function onBeforeUpdate() {
389389 }
390390 }
391391 } else {
392- // Add default remote_ips from Main Configuration.
393- $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
392+ if (!empty ($ global_config ['default_remote_dbserver ' ])) {
393+ // Add default remote_ips from Main Configuration.
394+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
394395
395- if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
396- $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
397- $ this ->dataRecord ['remote_access ' ] = 'y ' ;
396+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
397+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
398+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
399+ }
398400 }
399401 }
400402
@@ -487,12 +489,14 @@ function onBeforeInsert() {
487489 }
488490 }
489491 } else {
490- // Add default remote_ips from Main Configuration.
491- $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
492+ if (!empty ($ global_config ['default_remote_dbserver ' ])) {
493+ // Add default remote_ips from Main Configuration.
494+ $ remote_ips = explode (", " , $ global_config ['default_remote_dbserver ' ]);
492495
493- if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
494- $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
495- $ this ->dataRecord ['remote_access ' ] = 'y ' ;
496+ if ($ this ->dataRecord ['remote_access ' ] != 'y ' ){
497+ $ this ->dataRecord ['remote_ips ' ] = implode (', ' , $ remote_ips );
498+ $ this ->dataRecord ['remote_access ' ] = 'y ' ;
499+ }
496500 }
497501 }
498502
0 commit comments