diff --git a/src/applications/notification/client/PhabricatorNotificationServerRef.php b/src/applications/notification/client/PhabricatorNotificationServerRef.php
--- a/src/applications/notification/client/PhabricatorNotificationServerRef.php
+++ b/src/applications/notification/client/PhabricatorNotificationServerRef.php
@@ -161,9 +161,9 @@
     return $uri;
   }
 
-  public function getWebsocketURI($to_path = null) {
+  public function getWebsocketURI($to_path = '') {
     $instance = PhabricatorEnv::getEnvConfig('cluster.instance');
-    if (strlen($instance)) {
+    if (phutil_nonempty_string($instance)) {
       $to_path = $to_path.'~'.$instance.'/';
     }