File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -251,13 +251,15 @@ function onBeforeUpdate () {
251251 //* Check if the server has been changed
252252 // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
253253 if ($ _SESSION ["s " ]["user " ]["typ " ] == 'admin ' || $ app ->auth ->has_clients ($ _SESSION ['s ' ]['user ' ]['userid ' ])) {
254- $ rec = $ app ->db ->queryOneRecord ("SELECT server_id from web_domain WHERE domain_id = " .$ this ->id );
255- if ($ rec ['server_id ' ] != $ this ->dataRecord ["server_id " ]) {
256- //* Add a error message and switch back to old server
257- $ app ->tform ->errorMessage .= $ app ->lng ('The Server can not be changed. ' );
258- $ this ->dataRecord ["server_id " ] = $ rec ['server_id ' ];
254+ if (isset ($ this ->dataRecord ["server_id " ])){
255+ $ rec = $ app ->db ->queryOneRecord ("SELECT server_id from web_domain WHERE domain_id = " .$ this ->id );
256+ if ($ rec ['server_id ' ] != $ this ->dataRecord ["server_id " ]) {
257+ //* Add a error message and switch back to old server
258+ $ app ->tform ->errorMessage .= $ app ->lng ('The Server can not be changed. ' );
259+ $ this ->dataRecord ["server_id " ] = $ rec ['server_id ' ];
260+ }
261+ unset($ rec );
259262 }
260- unset($ rec );
261263 }
262264
263265 //* Check that all fields for the SSL cert creation are filled
You can’t perform that action at this time.
0 commit comments