Have [[++server_port]] report the port number #10852
Update code to avoid error/notice on CLI
Have [[++server_port]] report the port number

* origin/pr/11477:
  Update code to avoid error/notice on CLI
  Have [[++server_port]] report the port number #10852